bugDotGNU Portable.NET - Bugs: bug #26179, ChunkedDecoderStream.ReadChunkSize...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26179: ChunkedDecoderStream.ReadChunkSize fails to parse "123 <SPACE> <CR> <LF>"

Submitter:  Thomas Uxiou <uxiou>
Submitted:  Tue 14 Apr 2009 01:39:51 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 14 Apr 2009 07:49:20 PM UTC, comment #1: 

Hi Thomas,
your patch is now in cvs, so i am closing this bug.

Thanks!

Radek

Radek Polak <radekp>
Group Member
Tue 14 Apr 2009 01:39:51 PM UTC, original submission:  

I'm not sure if "123 <SP> <CR><LF>" is legal but "123 <SP> ;a=1 <CR><LF>" is (see below).

sample HTTP stream:
http://co.za/cgi-bin/whois.sh?Domain=example.co.za

fix:
# diff -ur pnetlibORG/System/Net/HttpWebResponse.cs pnetlib/System/Net/HttpWebResponse.cs
# --- pnetlibORG/System/Net/HttpWebResponse.cs 2009-04-14 13:39:43.000000000 +0200
# +++ pnetlib/System/Net/HttpWebResponse.cs 2009-04-14 15:32:05.000000000 +0200
# @@ -425,7 +425,7 @@
#  {
#  throw new IOException("unexpected end of stream");
#  }
# - if(b == 59) // chunk extension, we don't care
# + if(b == 59 || b == 32 || b == 9) // chunk extension, we don't care
#  {
#  append = false;
#  }



RFC 2068

# 2.1 Augmented BNF
#
# The grammar described by this specification is word-based. Except
# where noted otherwise, linear whitespace (LWS) can be included
# between any two adjacent words (token or quoted-string), and
# between adjacent tokens and delimiters (tspecials), without
# changing the interpretation of a field.

# 3.6 Transfer Codings
#
# chunk          = chunk-size [ chunk-ext ] CRLF
# hex-no-zero    = <HEX excluding "0">
# chunk-size     = hex-no-zero *HEX
# chunk-ext      = *( ";" chunk-ext-name [ "=" chunk-ext-value ] )
# tspecials      = "(" | ")" | "<" | ">" | "@"
#                         | "," | ";" | ":" | "\" | <">
#                         | "/" | "[" | "]" | "?" | "="
#                         | "{" | "}" | SP | HT
# LWS            = [CRLF] 1*( SP | HT )

# 2.2 Basic Rules
# HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all
# protocol elements except the entity-body (see appendix 19.3 for
# tolerant applications).



Thomas Uxiou <uxiou>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by radekp (Posted a comment)
  • -email is unavailable- added by uxiou (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-04-14 radekp StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code