From 058f43c987e1a4edac1ed16d338476affe4313d5 Mon Sep 17 00:00:00 2001 From: "darin%netscape.com" Date: Fri, 22 Jun 2001 01:46:16 +0000 Subject: [PATCH] Fixes bug 86608 "Content-Encoding with space in the end" patch=deinst@world.std.com, r=bbaetz, sr=darin, a=tor --- netwerk/protocol/http/src/nsHttpResponseHead.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.cpp b/netwerk/protocol/http/src/nsHttpResponseHead.cpp index 1956cd8389d..ae841ced8d7 100644 --- a/netwerk/protocol/http/src/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/src/nsHttpResponseHead.cpp @@ -187,6 +187,13 @@ nsHttpResponseHead::ParseHeaderLine(char *line) ++p; } while ((*p == ' ') || (*p == '\t')); + // trim trailing whitespace - bug 86608 + p2 = p + PL_strlen(p); + do { + --p2; + } while (p2 >= p && ((*p2 == ' ') || (*p2 == '\t'))); + *++p2 = 0; + // assign response header mHeaders.SetHeader(atom, p);