Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Apache does not accept IPv6 addresses with a scope id in the Host: header

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
Networking: HTTP
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: Masahiro YAMADA, Assigned: Masahiro YAMADA)

Tracking

(Blocks: 1 bug, {fixed1.9.1})

Trunk
mozilla1.9.2a1
fixed1.9.1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 4 obsolete attachments)

(Assignee)

Description

9 years ago
See https://issues.apache.org/bugzilla/show_bug.cgi?id=35122
-- 
When entering a scoped IPv6 address in Firefox, that same address is put in the HTTP Host: header.
But Apache rejects it with a 400 Bad Request and logs "Client sent malformed Host header" in the error log.
(Assignee)

Comment 1

9 years ago
I think , we should remove scope id before adding IPv6 address to Host: header.

http://mxr.mozilla.org/firefox/source/netwerk/protocol/http/src/nsHttpChannel.cpp?rev=1.334#213
OS: Windows XP → All
Hardware: PC → All
(Assignee)

Comment 2

9 years ago
Created attachment 348423 [details] [diff] [review]
Patch rev1.0 (for Trunk)

Sorry, I don't have IPv6 test environment. Please test this patch.
Assignee: nobody → masa141421356
Status: NEW → ASSIGNED
Attachment #348423 - Flags: review?(cbiesinger)
(Assignee)

Comment 3

9 years ago
Created attachment 348559 [details] [diff] [review]
Patch rev.1.01

Patch rev.1.0 removes character before "%".
"-1" in parameter of Left() is not needed.
Attachment #348423 - Attachment is obsolete: true
Attachment #348559 - Flags: review?(cbiesinger)
Attachment #348423 - Flags: review?(cbiesinger)
Duplicate of this bug: 292307
Comment on attachment 348559 [details] [diff] [review]
Patch rev.1.01

+        if (scopeIdPos < 0)

should be:
  if (scopeIdPos == kNotFound)

+            nsCAutoString ipv6Addr;
+            host.Left(ipv6Addr,scopeIdPos);
+            hostLine.Append(ipv6Addr);

should be:
  hostLine.Append(Substring(host, 0, scopeIdPos));

thanks for the patch!
Attachment #348559 - Flags: review?(cbiesinger) → review-
(note that I haven't tested this yet, I can do that tomorrow)
(Assignee)

Comment 7

9 years ago
Created attachment 348753 [details] [diff] [review]
Patch rev.1.02
Attachment #348559 - Attachment is obsolete: true
Attachment #348753 - Flags: review?(cbiesinger)
(Assignee)

Updated

9 years ago
Attachment #348753 - Flags: superreview?(bzbarsky)
Attachment #348753 - Flags: review?(cbiesinger) → review-
Comment on attachment 348753 [details] [diff] [review]
Patch rev.1.02

I tested this now and it does work.


You didn't make the kNotFound change.

Also, you should remove the brackets here for consistency now:
+        else if (scopeIdPos > 0) {
+            hostLine.Append(Substring(host, 0, scopeIdPos));
+        }
(Assignee)

Comment 9

9 years ago
Created attachment 348754 [details] [diff] [review]
Patch Rev.1.03

Sorry for spam.
Attachment #348753 - Attachment is obsolete: true
Attachment #348754 - Flags: superreview?(bzbarsky)
Attachment #348754 - Flags: review?(cbiesinger)
Attachment #348753 - Flags: superreview?(bzbarsky)
Comment on attachment 348754 [details] [diff] [review]
Patch Rev.1.03

can you please fix my other comment as well
Attachment #348754 - Flags: review?(cbiesinger) → review-

Comment 11

9 years ago
Comment on attachment 348754 [details] [diff] [review]
Patch Rev.1.03

Please ask for sr once this has r=  (though I'd think biesi can r+sr this one).
Attachment #348754 - Flags: superreview?(bzbarsky)
(Assignee)

Comment 12

9 years ago
Created attachment 348758 [details] [diff] [review]
Patch Rev.1.04
[Checkin: Comment 14]

(In reply to comment #10)
> (From update of attachment 348754 [details] [diff] [review])
> can you please fix my other comment as well

Oops, removing blacket is missing.
Attachment #348754 - Attachment is obsolete: true
Attachment #348758 - Flags: review?(cbiesinger)
Attachment #348758 - Flags: superreview+
Attachment #348758 - Flags: review?(cbiesinger)
Attachment #348758 - Flags: review+
(Assignee)

Updated

9 years ago
Attachment #348758 - Flags: approval1.9.1?
Attachment #348758 - Flags: approval1.9.0.6?
(Assignee)

Updated

9 years ago
Depends on: 466264
Keywords: checkin-needed
Version: unspecified → Trunk
Comment on attachment 348758 [details] [diff] [review]
Patch Rev.1.04
[Checkin: Comment 14]

a191=beltzner
Attachment #348758 - Flags: approval1.9.1? → approval1.9.1+
Attachment #348758 - Attachment description: Patch Rev.1.04 → Patch Rev.1.04 [Checkin: Comment 14]
Comment on attachment 348758 [details] [diff] [review]
Patch Rev.1.04
[Checkin: Comment 14]

http://hg.mozilla.org/mozilla-central/rev/bb80e727c531
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [c-n: baking for 1.9.1]
Target Milestone: --- → mozilla1.9.2a1
Keywords: checkin-needed
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/f9b9392580e2
Keywords: checkin-needed → fixed1.9.1
Whiteboard: [c-n: baking for 1.9.1]
Attachment #348758 - Flags: approval1.9.0.6? → approval1.9.0.6-
Comment on attachment 348758 [details] [diff] [review]
Patch Rev.1.04
[Checkin: Comment 14]

This fix is not in the scope of our maintenance releases.

Updated

8 years ago
Duplicate of this bug: 499835

Updated

8 years ago
Duplicate of this bug: 501584
You need to log in before you can comment on or make changes to this bug.