unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Support Websocket status code
Date: Wed, 7 Aug 2019 19:39:41 +0800	[thread overview]
Message-ID: <CAPjoZofUa7=4OCodnCyNrD55-v9tHAZXJyj_aEsT0uFxOJ-8NQ@mail.gmail.com> (raw)
In-Reply-To: <87d0hhh3fz.fsf@netris.org>

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

hi Mark!
Yes you're right, the status code should be encoded in close-frame, not
HTTP response.
Sorry for the wrong patch. ;-)

Best regards.


On Wed, Aug 7, 2019 at 2:52 PM Mark H Weaver <mhw@netris.org> wrote:

> Hi,
>
> Nala Ginrut <nalaginrut@gmail.com> writes:
>
> > Hi folks!
> > The current response builder will reject status code less than 600:
> > -------------------------------code-------------------------
> >  ((not (and (non-negative-integer? code) (< code 600)))
> >   (bad-response "Bad code: ~a" code))
> > ---------------------------------------------------------------
> >
> > However, Websocket specific status code is larger than 1000.
>
> Section 4.2.2 paragraph 5 of RFC 6455 (the WebSocket RFC) makes it clear
> that the HTTP response should conform to RFC 2616, which specifies that
> the status code is a 3-digit integer less than 600.
>
> If I understand correctly, the larger status codes defined in section
> 7.4.1 of RFC 6455 are never used in HTTP response headers.  Rather, they
> are optionally used in WebSocket Close control frames to indicate the
> reason for closure.  See section 7.1.6 for more on that.
>
> The WebSocket protocol is quite distinct from the HTTP protocol.
> Although HTTP is used initially, after the server returns the HTTP
> response with status "101 Switching Protocols", a completely different
> protocol is used henceforth.
>
> So, I don't see anything in the RFCs to justify using the larger status
> codes in HTTP response status line.  Am I misunderstanding something?
>
>        Mark
>

[-- Attachment #2: Type: text/html, Size: 2111 bytes --]

      reply	other threads:[~2019-08-07 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  6:06 Support Websocket status code Nala Ginrut
2019-07-29  6:57 ` Nala Ginrut
2019-08-07  6:52 ` Mark H Weaver
2019-08-07 11:39   ` Nala Ginrut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPjoZofUa7=4OCodnCyNrD55-v9tHAZXJyj_aEsT0uFxOJ-8NQ@mail.gmail.com' \
    --to=nalaginrut@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).