[ee122] Persistent Connections

Lisa Fowler fowler at eecs.berkeley.edu
Mon Oct 29 14:03:43 PDT 2007

On 10/29/07, Jeremy Fleischman <jeremyfleischman at berkeley.edu> wrote:
> Two quick questions.
> Say that my client connects to a given server, say fourtytwo.com (after
> typing in http://fourtytwo.com) and requests a persistent connection by
> including the header "Connection: Keep-Alive". Say that the server decides
> to honor the request. Now I type http://fourtytwo.com:7788 into my client.
> Since I'm using persistent connections, the spec tells us to re-use the
> existing connection to fourtytwo.com . However, this existing connection is
> to port 80, not port 7788! Should we be checking the port number when
> deciding whether to re-use a connection?

Yes you should.  The port # does matter.

> Also, why oh why does the spec not allow for horizontal dashes ( - ) in a
> hostname? Lots of real domain names have them, and it's driven me crazy
> trying to test my client out in the "real world", and finding that it can't
> connect to these real websites.

I'm sorry.  Unfortunately this is not an uncommon experience when
writing code.  You might find ways to make your client "better" but if
it goes against the specs, then it'll be "wrong", even if it is
"better".  Please try to use sites that don't have dashes in them.
You may extend your client with an option to support dashes, so long
as you return it to the spec-compliant form before you submit.


More information about the ee122 mailing list