Re: Content-Length specifics

2002-06-21 Thread William A. Rowe, Jr.

At 09:11 PM 6/20/2002, Jim Jagielski wrote:
Is whitespace allowed after the value set in Content-Length? eg:

Content-Length: 12344  \r\n

That falls under the generic LWS rule.

Bill





Re: Content-Length specifics

2002-06-21 Thread dirkx


On Thu, 20 Jun 2002, Jim Jagielski wrote:

 Is whitespace allowed after the value set in Content-Length? eg:

Content-Length: 12344  \r\n
 ^^

We've allways followed the IETF dogma:

Be strict in what you send, but liberal in what you accept.

Looking at the BNF in 2616 - it's a valid header. Looking at the
definition of the length itself; not too clear it is wrong - in fact -
this is not too well described.


Dw




Re: Content-Length specifics

2002-06-21 Thread Jim Jagielski

Cliff Woolley wrote:
 
 On Thu, 20 Jun 2002, Justin Erenkrantz wrote:
 
  I believe so.  Our current implementation supports it.  -- justin
 
 Does 1.3's now that we've changed it?
 

Yes, it still works, though mostly it's because we '%ld' the value
in the table. ;) I was just walking through what could happen if,
in some way, the value in the table was something like 123  or so.
That does not look possible, but if it *does* happen, then our current
code will see that as a bad request (the (endptr  *endptr) test).
Not a problem, but a point to keep in mind.

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: Content-Length specifics

2002-06-21 Thread Jim Jagielski

Jim Jagielski wrote:
 
 Yes, it still works, though mostly it's because we '%ld' the value
 in the table. ;) I was just walking through what could happen if,
 in some way, the value in the table was something like 123  or so.
 That does not look possible, but if it *does* happen, then our current
 code will see that as a bad request (the (endptr  *endptr) test).
 Not a problem, but a point to keep in mind.
 

That's both 1.3 and 2.0, btw.
-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: Content-Length specifics

2002-06-20 Thread Justin Erenkrantz

On Thu, Jun 20, 2002 at 10:11:18PM -0400, Jim Jagielski wrote:
 Is whitespace allowed after the value set in Content-Length? eg:
 
Content-Length: 12344  \r\n
 ^^

I believe so.  Our current implementation supports it.  -- justin



Re: Content-Length specifics

2002-06-20 Thread Cliff Woolley

On Thu, 20 Jun 2002, Justin Erenkrantz wrote:

 I believe so.  Our current implementation supports it.  -- justin

Does 1.3's now that we've changed it?

--Cliff




Re: Content-Length specifics

2002-06-20 Thread Justin Erenkrantz

On Fri, Jun 21, 2002 at 12:56:47AM -0400, Cliff Woolley wrote:
 On Thu, 20 Jun 2002, Justin Erenkrantz wrote:
 
  I believe so.  Our current implementation supports it.  -- justin
 
 Does 1.3's now that we've changed it?

I don't see why strtol wouldn't parse that.

But, the key thing to remember is that headers are stripped of
trailing spaces before they are placed in the table.  So, in
practice, we'll never see trailing spaces.  -- justin



Re: Content-Length specifics

2002-06-20 Thread Cliff Woolley

On Thu, 20 Jun 2002, Justin Erenkrantz wrote:

 But, the key thing to remember is that headers are stripped of
 trailing spaces before they are placed in the table.

Ahh, that is the key.  Thanks.