Closed Bug 282917 Opened 20 years ago Closed 20 years ago

typo in nsHTTPCompressConv.cpp

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: esabate, Assigned: Biesinger)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421 Yesterdya i've downloaded the source tree for Mozilla and i was looking in the source to find how the decompression of pages compressed at server works. In the source i think that there is an error that makes compressed responses with HTTP_COMPRESS_GZIP method never get decompressed. The involved file is nsHTTPCompressConv.cpp and the involved line is line 99: in this line you make a PL_strncasecmp(fromStr, HTTP_GZIP_TYPE, sieof(HTTP_COMPRESS_TYPE)) (Obviously, the pointer is rigth but not the length!!! so the comparation is always false). I think that this is due a vi yy of the lineno 95. I hope that if this is true help you to improve the excelent suite of software Reproducible: Always
Assignee: general → darin
Component: General → Networking
Product: Mozilla Application Suite → Core
QA Contact: general → benc
Version: unspecified → Trunk
PL_strncasecmp's third argument is a maximum number of characters to compare, but it will stop at the first NUL. /be
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
while maybe not a bug, this is still a typo that confuses people who look at it. it seems to me like we should still fix it.
Status: RESOLVED → UNCONFIRMED
OS: Windows XP → All
Hardware: PC → All
Resolution: INVALID → ---
Attached patch patchSplinter Review
Assignee: darin → cbiesinger
Status: UNCONFIRMED → ASSIGNED
Attachment #174924 - Flags: superreview?(darin)
Attachment #174924 - Flags: review?(darin)
Comment on attachment 174924 [details] [diff] [review] patch My apologies, thanks to biesi for reopening and sr=me FWIW. /be
Attachment #174924 - Flags: superreview?(darin)
Attachment #174924 - Flags: superreview+
Attachment #174924 - Flags: review?(darin)
Attachment #174924 - Flags: review+
Checking in netwerk/streamconv/converters/nsHTTPCompressConv.cpp; /cvsroot/mozilla/netwerk/streamconv/converters/nsHTTPCompressConv.cpp,v <-- nsHTTPCompressConv.cpp new revision: 1.24; previous revision: 1.23 done Thank you for finding and reporting this typo!
Status: ASSIGNED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Though marked as fixed, this could use a better title. ;-)
Summary: I think that there is a bug in the source code → typo in nsHTTPCompressConv.cpp
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: