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>"

Submitted by:  Thomas Uxiou <uxiou>
Submitted on:  Tue 14 Apr 2009 01:39:51 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 14 Apr 2009 07:49:20 PM UTCradekpStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1