unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Support Websocket status code
Date: Wed, 07 Aug 2019 02:52:37 -0400	[thread overview]
Message-ID: <87d0hhh3fz.fsf@netris.org> (raw)
In-Reply-To: <CAPjoZoe3XVoVTwzpg5qviBra50k4Wq4_05-dhA2fNhBRcf3wAg@mail.gmail.com> (Nala Ginrut's message of "Fri, 26 Jul 2019 14:06:48 +0800")

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



  parent reply	other threads:[~2019-08-07  6:52 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 [this message]
2019-08-07 11:39   ` Nala Ginrut

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=87d0hhh3fz.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=nalaginrut@gmail.com \
    /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).