My favorites | Sign in
Google
                
Details: Show all Hide all

Earlier this year

  • Nov 20, 2009
    r121 (Use size_t for string lengths to avoid compiler warnings. P...) committed by brettw   -   Use size_t for string lengths to avoid compiler warnings. Patch by Gregory Dardyk
    Use size_t for string lengths to avoid compiler warnings. Patch by Gregory Dardyk
  • Oct 19, 2009
    r120 (Fix encoding of the query part of an URL. Encoding of the q...) committed by brettw   -   Fix encoding of the query part of an URL. Encoding of the query part of an URL was inconsistent: If it was part of a larger relative URL, it would get encoded. However, if the query part was stand-alone, then it would not be encoded. As indicated by the original layout test referenced in the bug (see below), this patch changes the code so that the query part is encoded in both cases. Note, however, that with this patch the layout test will NOT yet fully pass, since it also handles the fragment part differently. As the different handling of the fragment part seems to be quite on purpose, I have not modified the behavior - see the discussion at http://code.google.com/p/chromium/issues/detail?id=20507 . BUG=20507, 8912 TEST=LayoutTests/http/tests/uri/resolve-encoding-relative.html Patch by Roland Steiner, review URL http://codereview.chromium.org/243028
    Fix encoding of the query part of an URL. Encoding of the query part of an URL was inconsistent: If it was part of a larger relative URL, it would get encoded. However, if the query part was stand-alone, then it would not be encoded. As indicated by the original layout test referenced in the bug (see below), this patch changes the code so that the query part is encoded in both cases. Note, however, that with this patch the layout test will NOT yet fully pass, since it also handles the fragment part differently. As the different handling of the fragment part seems to be quite on purpose, I have not modified the behavior - see the discussion at http://code.google.com/p/chromium/issues/detail?id=20507 . BUG=20507, 8912 TEST=LayoutTests/http/tests/uri/resolve-encoding-relative.html Patch by Roland Steiner, review URL http://codereview.chromium.org/243028
  • Oct 14, 2009
    issue 14 (googleurl doesn't accept about: URLs with query parameters) reported by yutak@chromium.org   -   Derived from the following Chromium issue: http://code.google.com/p/chromium/issues/detail?id=20570 googleurl does not accept about: URLs with query parameters. Seemingly, Safari and Firefox accepts such URLs. For compatibility with these browsers, googleurl should also support this. As far as I can tell from the code, I think we can treat about: URLs like mailto: URLs to fix this issue.
    Derived from the following Chromium issue: http://code.google.com/p/chromium/issues/detail?id=20570 googleurl does not accept about: URLs with query parameters. Seemingly, Safari and Firefox accepts such URLs. For compatibility with these browsers, googleurl should also support this. As far as I can tell from the code, I think we can treat about: URLs like mailto: URLs to fix this issue.
  • Oct 10, 2009
    issue 13 (uint64 not defined in basictypes.h for url_canon_ip.cc) reported by VeXocide   -   What steps will reproduce the problem? 1. Try to compile url_canon_ip.cc What is the expected output? What do you see instead? You get an error for an undefined type on line 170, where 'uint64' is used, but unlike uint32, 16, and 8 this is not defined in basictypes.h This can be fixed by adding the following declaration: "typedef unsigned long long uint64;" I believe. What version of the product are you using? On what operating system? Linux x86 with GCC version 4.4.1.
    What steps will reproduce the problem? 1. Try to compile url_canon_ip.cc What is the expected output? What do you see instead? You get an error for an undefined type on line 170, where 'uint64' is used, but unlike uint32, 16, and 8 this is not defined in basictypes.h This can be fixed by adding the following declaration: "typedef unsigned long long uint64;" I believe. What version of the product are you using? On what operating system? Linux x86 with GCC version 4.4.1.
  • Sep 28, 2009
    r119 (Remove ICU dependency from url_canon_internal. We were just ...) committed by brettw   -   Remove ICU dependency from url_canon_internal. We were just picking up some types and MAX* values for those tyeps from ICU, and weren't using it for anything else in this context. Patch by Matthew Steele
    Remove ICU dependency from url_canon_internal. We were just picking up some types and MAX* values for those tyeps from ICU, and weren't using it for anything else in this context. Patch by Matthew Steele
  • Sep 23, 2009
    r118 (Fix off-by-one in range check. http://crbug.com/5490 Patch ...) committed by brettw   -   Fix off-by-one in range check. http://crbug.com/5490 Patch by mattm@chromium.org Review: http://codereview.chromium.org/216020
    Fix off-by-one in range check. http://crbug.com/5490 Patch by mattm@chromium.org Review: http://codereview.chromium.org/216020
  • Sep 23, 2009
    issue 12 (README com compile in Linux Ubuntu) reported by karane   -   Is there any instructions to build the project in Linux Ubuntu?
    Is there any instructions to build the project in Linux Ubuntu?
  • Sep 18, 2009
    r117 (Fix googleurl to use icu version-agnostic directory. Adds t...) committed by maruelatchromium   -   Fix googleurl to use icu version-agnostic directory. Adds text files as item in the projects. Review URL: http://codereview.chromium.org/214013
    Fix googleurl to use icu version-agnostic directory. Adds text files as item in the projects. Review URL: http://codereview.chromium.org/214013
  • Sep 08, 2009
    r116 (Change WebSocket default port The Web Socket protocol speci...) committed by willchan@chromium.org   -   Change WebSocket default port The Web Socket protocol specification draft has changed the default port of Web Socket recently. http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-hixie-thewebsocket... BUG=none TEST=googleurl_unittests URLCanonTest.CanonicalizeStandardURL passes. Patch contributed by ukai@chromium.org.
    Change WebSocket default port The Web Socket protocol specification draft has changed the default port of Web Socket recently. http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-hixie-thewebsocket... BUG=none TEST=googleurl_unittests URLCanonTest.CanonicalizeStandardURL passes. Patch contributed by ukai@chromium.org.
  • Aug 26, 2009
    r115 (Update the unit tests to allow a colon in UNC hostnames on W...) committed by brettw   -   Update the unit tests to allow a colon in UNC hostnames on Windows. This test was broken in r107 but we weren't running the tests properly so never noticed. Colon is probably not allowed by Windows, but its the "natural" result of the way the canonicalizer is written. There doesn't seem to be a strong argument for why allowing it here would be bad, so we just tolerate it and the load will fail later. Review URL: http://codereview.chromium.org/173535
    Update the unit tests to allow a colon in UNC hostnames on Windows. This test was broken in r107 but we weren't running the tests properly so never noticed. Colon is probably not allowed by Windows, but its the "natural" result of the way the canonicalizer is written. There doesn't seem to be a strong argument for why allowing it here would be bad, so we just tolerate it and the load will fail later. Review URL: http://codereview.chromium.org/173535
  • Aug 21, 2009
    r114 (Use U_ICU_VERSION_SHORT macro instead of hard-coding icu dat...) committed by brettw   -   Use U_ICU_VERSION_SHORT macro instead of hard-coding icu data dll and module name. BUG=8198 TEST=googleurl test should be built and run without a problem. Patch by Jungshik Shin Review: http://codereview.chromium.org/174265
    Use U_ICU_VERSION_SHORT macro instead of hard-coding icu data dll and module name. BUG=8198 TEST=googleurl test should be built and run without a problem. Patch by Jungshik Shin Review: http://codereview.chromium.org/174265
  • Aug 18, 2009
    r113 (All host names with nonascii characters (cyrillic) + escapab...) committed by brettw   -   All host names with nonascii characters (cyrillic) + escapable characters (,)... were shown corrupted in suggestion box in Omnibox2, because we escaped punicode string after it was created. I added some more escaping before IDNA conversion. Unittest updated, and main method added so we can init ICU data properly. http://crbug.com/5490 TEST=Follow bug description, and make sure that test is as expected (orignal text+%28). Patch by: cira@chromium.org Review: http://codereview.chromium.org/160589
    All host names with nonascii characters (cyrillic) + escapable characters (,)... were shown corrupted in suggestion box in Omnibox2, because we escaped punicode string after it was created. I added some more escaping before IDNA conversion. Unittest updated, and main method added so we can init ICU data properly. http://crbug.com/5490 TEST=Follow bug description, and make sure that test is as expected (orignal text+%28). Patch by: cira@chromium.org Review: http://codereview.chromium.org/160589
  • Aug 04, 2009
    r112 (Add Web Socket default port. As described in http://tools.i...) committed by willchan@chromium.org   -   Add Web Socket default port. As described in http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol, ws (Web Socket) scheme uses port 81 by default, and wss (secure Web Socket) scheme uses port 815 by default. BUG=none TEST=googleurl_unittests URLCanonTest.CanonicalizeStandardURL passes. Review URL: http://codereview.chromium.org/159401
    Add Web Socket default port. As described in http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol, ws (Web Socket) scheme uses port 81 by default, and wss (secure Web Socket) scheme uses port 815 by default. BUG=none TEST=googleurl_unittests URLCanonTest.CanonicalizeStandardURL passes. Review URL: http://codereview.chromium.org/159401
  • Aug 04, 2009
    issue 11 (GURL::is_valid() is true, but GURL::GetOrigin().is_valid() i...) Status changed by willchan@chromium.org   -   Actually, this probably isn't a bug in GURL, but rather in the chrome code that seems to think the scheme is http and therefore must have a host.
    Status: Invalid
    Actually, this probably isn't a bug in GURL, but rather in the chrome code that seems to think the scheme is http and therefore must have a host.
    Status: Invalid
  • Aug 04, 2009
    issue 11 (GURL::is_valid() is true, but GURL::GetOrigin().is_valid() i...) reported by willchan@chromium.org   -   I found this in a Chromium crash report. "httppt: */*\r\nAccept-Encoding: gzip,deflate,sdch\r\nAccept-Language: en- US,en;q=0.8\r\n" GURL parses this as valid, but the GURL returned by GetOrigin() is invalid.
    I found this in a Chromium crash report. "httppt: */*\r\nAccept-Encoding: gzip,deflate,sdch\r\nAccept-Language: en- US,en;q=0.8\r\n" GURL parses this as valid, but the GURL returned by GetOrigin() is invalid.
  • Jul 28, 2009
    issue 10 (% in the username gets escaped when canonicalizing GURL) changed by willchan@chromium.org   -   Fixed in r111
    Status: Fixed
    Owner: willc...@chromium.org
    Fixed in r111
    Status: Fixed
    Owner: willc...@chromium.org
  • Jul 28, 2009
    r111 (Canonicalize '%' in userinfo properly. It should not be esc...) committed by willchan@chromium.org   -   Canonicalize '%' in userinfo properly. It should not be escaped. According to RFC 1738: user = *[ uchar | ";" | "?" | "&" | "=" ] password = *[ uchar | ";" | "?" | "&" | "=" ] uchar = unreserved | escape escape = "%" hex hex BUG=http://code.google.com/p/google-url/issues/detail?id=10 Review URL: http://codereview.chromium.org/160282
    Canonicalize '%' in userinfo properly. It should not be escaped. According to RFC 1738: user = *[ uchar | ";" | "?" | "&" | "=" ] password = *[ uchar | ";" | "?" | "&" | "=" ] uchar = unreserved | escape escape = "%" hex hex BUG=http://code.google.com/p/google-url/issues/detail?id=10 Review URL: http://codereview.chromium.org/160282
  • Jul 28, 2009
    issue 9 (http://user:pass@/ should be an invalid url) changed by willchan@chromium.org   -   Fixed in r109
    Status: Fixed
    Owner: willc...@chromium.org
    Fixed in r109
    Status: Fixed
    Owner: willc...@chromium.org
  • Jul 20, 2009
    issue 10 (% in the username gets escaped when canonicalizing GURL) reported by willchan@chromium.org   -   http://%2540:bar@domain.com/ becomes http://%252540:bar@domain.com/.
    http://%2540:bar@domain.com/ becomes http://%252540:bar@domain.com/.
  • Jul 15, 2009
    r110 (Expose in url_canon_ip.h the previously internal-only functi...) committed by eroman@chromium.org   -   Expose in url_canon_ip.h the previously internal-only functions: url_canon::IPv4AddressToNumber() url_canon::IPv6AddressToNumber() Motivation: I would like to use url_canon::IPv6AddressToNumber() in some chromium network tests, to create mock IPv6 socketaddrs. The system-provided equivalents (like getaddrinfo() or inet_ntop()) are unreliable for this purpose, since they only work on IPv6-enabled machines. BUG=NONE TEST=NONE R=brettw
    Expose in url_canon_ip.h the previously internal-only functions: url_canon::IPv4AddressToNumber() url_canon::IPv6AddressToNumber() Motivation: I would like to use url_canon::IPv6AddressToNumber() in some chromium network tests, to create mock IPv6 socketaddrs. The system-provided equivalents (like getaddrinfo() or inet_ntop()) are unreliable for this purpose, since they only work on IPv6-enabled machines. BUG=NONE TEST=NONE R=brettw
  • Jul 15, 2009
    r109 (Require hosts for non-file URLs. BUG=9 Patch by willchan@chr...) committed by brettw   -   Require hosts for non-file URLs. BUG=9 Patch by willchan@chromium.org Original review: http://codereview.chromium.org/149588
    Require hosts for non-file URLs. BUG=9 Patch by willchan@chromium.org Original review: http://codereview.chromium.org/149588
  • Jul 13, 2009
    issue 9 (http://user:pass@/ should be an invalid url) reported by willchan@chromium.org   -   GURL raw("http://user:pass@/"); CHECK(raw.is_valid()); GURL origin = raw.GetOrigin(); CHECK(origin.is_valid()); The first CHECK passes. The second check fails. The first CHECK seems like it should fail.
    GURL raw("http://user:pass@/"); CHECK(raw.is_valid()); GURL origin = raw.GetOrigin(); CHECK(origin.is_valid()); The first CHECK passes. The second check fails. The first CHECK seems like it should fail.
  • Jul 13, 2009
    r108 (Make DoCanonicalizeIPv6Address safer by changing loop condit...) committed by brettw   -   Make DoCanonicalizeIPv6Address safer by changing loop condition and adding a DCHECK Patch by yuzo@chromium.org Original review URL: http://codereview.chromium.org/155077
    Make DoCanonicalizeIPv6Address safer by changing loop condition and adding a DCHECK Patch by yuzo@chromium.org Original review URL: http://codereview.chromium.org/155077
  • Jun 22, 2009
    r107 (url_canon: New CanonicalizeHostVerbose() function. This fun...) committed by pmarks@google.com   -   url_canon: New CanonicalizeHostVerbose() function. This function allows the caller to distinguish between 4 cases: - A valid, canonical IPv4 address. - A valid, canonical IPv6 address. - A "broken" address. This is something which kinda almost looks like an IP address, but has been deemed to be invalid. For IPv4, this indicates a numerical component which is longer than 16 digits, or one which can't be used without truncation/overflow. For IPv6, this is any non-parseable address containing a colon or square brackets. - "neutral". This indicates that the output doesn't really look like an IP address at all, and should probably be treated as a hostname. The CanonHostInfo struct is meant to be extensible. In addition to the 4 cases above, it also returns the number of components used to make an IPv4 address, which will be useful to Chromium, and will make it possible stop exposing FindIPv4Components. This is the first step toward making Chrome behave better for these cases: - http://[www.google.com]/ - http://192.168.0.0000000000000000000000000001/ - http://192.168.0.99999/ Edit: - Changed the signature of CanonicalizeIPAddress(), instead of creating a new "Verbose" version. - For completeness, now includes the CanonicalizeHost() changes, with an extended-output CanonicalizeHostVerbose(), because some callers only care whether the canonicalization was a success or not. Code review: http://codereview.chromium.org/114050
    url_canon: New CanonicalizeHostVerbose() function. This function allows the caller to distinguish between 4 cases: - A valid, canonical IPv4 address. - A valid, canonical IPv6 address. - A "broken" address. This is something which kinda almost looks like an IP address, but has been deemed to be invalid. For IPv4, this indicates a numerical component which is longer than 16 digits, or one which can't be used without truncation/overflow. For IPv6, this is any non-parseable address containing a colon or square brackets. - "neutral". This indicates that the output doesn't really look like an IP address at all, and should probably be treated as a hostname. The CanonHostInfo struct is meant to be extensible. In addition to the 4 cases above, it also returns the number of components used to make an IPv4 address, which will be useful to Chromium, and will make it possible stop exposing FindIPv4Components. This is the first step toward making Chrome behave better for these cases: - http://[www.google.com]/ - http://192.168.0.0000000000000000000000000001/ - http://192.168.0.99999/ Edit: - Changed the signature of CanonicalizeIPAddress(), instead of creating a new "Verbose" version. - For completeness, now includes the CanonicalizeHost() changes, with an extended-output CanonicalizeHostVerbose(), because some callers only care whether the canonicalization was a success or not. Code review: http://codereview.chromium.org/114050
  • Jun 18, 2009
    issue 8 (StandardURL containing a "#" in the password gets mis-parsed) commented on by vega.james   -   Indeed, Firefox does have the same behavior. I thought I had tested that. Sorry for the noise.
    Indeed, Firefox does have the same behavior. I thought I had tested that. Sorry for the noise.
  • Jun 18, 2009
    issue 8 (StandardURL containing a "#" in the password gets mis-parsed) Status changed by brettw   -   I just tested and it looks like it matches IE8 and Firefox3. If I'm correct, this is working as intended. Can you verify?
    Status: WontFix
    I just tested and it looks like it matches IE8 and Firefox3. If I'm correct, this is working as intended. Can you verify?
    Status: WontFix
  • Jun 17, 2009
    issue 8 (StandardURL containing a "#" in the password gets mis-parsed) reported by vega.james   -   What steps will reproduce the problem? 1. Parse a url of the form http://user:#pass@host/path 2. 3. What is the expected output? What do you see instead? user is treated as the host and pass@host/path is treated as a ref. What version of the product are you using? On what operating system? r106 from SVN, via Chromium. Attached patch is a test-case for the URL.
    What steps will reproduce the problem? 1. Parse a url of the form http://user:#pass@host/path 2. 3. What is the expected output? What do you see instead? user is treated as the host and pass@host/path is treated as a ref. What version of the product are you using? On what operating system? r106 from SVN, via Chromium. Attached patch is a test-case for the URL.
  • Jun 03, 2009
    r106 (url_parse: Segment partially-typed IPv6 literals. In Chromi...) committed by pmarks@google.com   -   url_parse: Segment partially-typed IPv6 literals. In Chromium, when a user is typing an IPv6 literal into the address bar, the autocomplete system goes nuts, trying to grab a port from the end of the address before it's complete. Fix this by parsing unterminated IPv6 literals as if there were no port number. These partial addresses will not survive canonicalization, but they keep the autocompleter running smoothly as the address is typed. Also, fix some minor lint warnings elsewhere in url_parse.cc Code review: http://codereview.chromium.org/115748
    url_parse: Segment partially-typed IPv6 literals. In Chromium, when a user is typing an IPv6 literal into the address bar, the autocomplete system goes nuts, trying to grab a port from the end of the address before it's complete. Fix this by parsing unterminated IPv6 literals as if there were no port number. These partial addresses will not survive canonicalization, but they keep the autocompleter running smoothly as the address is typed. Also, fix some minor lint warnings elsewhere in url_parse.cc Code review: http://codereview.chromium.org/115748
  • Jun 02, 2009
    r105 (Move ICU dependent function ReadUTFChar into the icu.cc file...) committed by brettw   -   Move ICU dependent function ReadUTFChar into the icu.cc file. This avoids icu dependency in other object files that use inline functions from url_canon_internal.h. Patch by tommi@chromium.org. Review: http://codereview.chromium.org/118062
    Move ICU dependent function ReadUTFChar into the icu.cc file. This avoids icu dependency in other object files that use inline functions from url_canon_internal.h. Patch by tommi@chromium.org. Review: http://codereview.chromium.org/118062
  • May 19, 2009
    issue 7 (GURL: add a PlainHost() method for bracketless IPv6 literals...) Status changed by eroman@chromium.org   -   HostNoBrackets() was committed in r102 Also see the dialog in issue 2 surrounding this.
    Status: Fixed
    HostNoBrackets() was committed in r102 Also see the dialog in issue 2 surrounding this.
    Status: Fixed
  • May 19, 2009
    issue 2 (IPv6 string literals need canonicalization) Status changed by eroman@chromium.org   -   - IPV6 helper HostNoBrackets() committed in r102 - IPv6 canonicalizer committed in r104.
    Status: Fixed
    - IPV6 helper HostNoBrackets() committed in r102 - IPv6 canonicalizer committed in r104.
    Status: Fixed
  • May 18, 2009
    r104 (Canonicalize IPv6 addresses. BUG=http://code.google.com/p/g...) committed by eroman@chromium.org   -   Canonicalize IPv6 addresses. BUG=http://code.google.com/p/google-url/issues/detail?id=2 Review URL: http://codereview.chromium.org/99183
  • May 18, 2009
    r103 (Support Z as a first letter of a scheme. Patch by Paul Mark...) committed by brettw   -   Support Z as a first letter of a scheme. Patch by Paul Marks. Review URL: http://codereview.chromium.org/113514
    Support Z as a first letter of a scheme. Patch by Paul Marks. Review URL: http://codereview.chromium.org/113514
  • May 13, 2009
    r102 (A URL can contain an IPv6 address literal, like [2001:db8::2...) committed by brettw   -   A URL can contain an IPv6 address literal, like [2001:db8::2]. Users of the GURL library sometimes need the square brackets, and sometimes don't. Checked in for Paul Marks Review URL: http://codereview.chromium.org/113187
    A URL can contain an IPv6 address literal, like [2001:db8::2]. Users of the GURL library sometimes need the square brackets, and sometimes don't. Checked in for Paul Marks Review URL: http://codereview.chromium.org/113187
  • May 12, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by pmarks@google.com   -   I guess the real issue here is deciding whether the canonical representation of an IPv6 address in a Web context should be :: or [::]. Should all dialog boxes, cookies, etc. include the brackets? I think it's easier for everyone if the brackets are included, rather than forcing everyone to mentally box and unbox the addresses when moving between URLs and non-URLs. A lot of code out there implicitly assumes that host:port can be concatenated, and changing that would result in a lot of bugs. IP address literals are rare enough in practice that it's not worth all the re-education, both of programmers and users. For the handful of cases where the host needs to be resolved into a machine-readable address, we can use HostNoBrackets(). Everyone who only cares about the host as an opaque token can just keep using host().
    I guess the real issue here is deciding whether the canonical representation of an IPv6 address in a Web context should be :: or [::]. Should all dialog boxes, cookies, etc. include the brackets? I think it's easier for everyone if the brackets are included, rather than forcing everyone to mentally box and unbox the addresses when moving between URLs and non-URLs. A lot of code out there implicitly assumes that host:port can be concatenated, and changing that would result in a lot of bugs. IP address literals are rare enough in practice that it's not worth all the re-education, both of programmers and users. For the handful of cases where the host needs to be resolved into a machine-readable address, we can use HostNoBrackets(). Everyone who only cares about the host as an opaque token can just keep using host().
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by pmarks@google.com   -   I personally don't understand the interactions well enough to know what the impact would be of changing the meaning of host(). For example, someone will have to figure out if the change breaks WebKit: http://trac.webkit.org/browser/trunk/WebCore/platform/KURL.h
    I personally don't understand the interactions well enough to know what the impact would be of changing the meaning of host(). For example, someone will have to figure out if the change breaks WebKit: http://trac.webkit.org/browser/trunk/WebCore/platform/KURL.h
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by wtc@chromium.org   -   The issue with HostNoBrackets() is that users need to learn when to use host() and when to use HostNoBrackets(). The issue with a host+port function is that users need to learn they should not concatenate host and port manually. I proposed a host+port function because it seems easier to learn the latter, and variants of a host+port function already exist: - GetHostAndPort: in "net/base/net_util.h". These are parsing functions. - ProxyServer::host_and_port: in "net/proxy/proxy_server.h" It seems that host() should only be used if the host is to be concatenated with a port manually. Is there any other context in which an IPv6 address literal also needs to be quoted with square brackets?
    The issue with HostNoBrackets() is that users need to learn when to use host() and when to use HostNoBrackets(). The issue with a host+port function is that users need to learn they should not concatenate host and port manually. I proposed a host+port function because it seems easier to learn the latter, and variants of a host+port function already exist: - GetHostAndPort: in "net/base/net_util.h". These are parsing functions. - ProxyServer::host_and_port: in "net/proxy/proxy_server.h" It seems that host() should only be used if the host is to be concatenated with a port manually. Is there any other context in which an IPv6 address literal also needs to be quoted with square brackets?
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by brettw   -   Sounds good. I don't want to add too many crazy functions to GURL or it will become too difficult to understand.
    Sounds good. I don't want to add too many crazy functions to GURL or it will become too difficult to understand.
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by pmarks@google.com   -   [sorry, I'm mixing up my accounts. pmarks@google == sparkmaul@gmail]
    [sorry, I'm mixing up my accounts. pmarks@google == sparkmaul@gmail]
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by sparkmaul   -   > What is the host + port function needed for? wtc suggested it in comment 9. host+port (e.g. "[2001:db8::1]:8080") will be needed for the HTTP "Host:" header. However, the current plan (with host(), port(), and HostNoBrackets()) sounds good to me, because it gives you the components to assemble whatever you need: - For getaddrinfo(), use HostNoBrackets() - For the "Host:" header, concatenate host() + port() - For hostname canonicalization, use host() - To reassemble the original URL, concatenate ... + host() + port() + ...
    > What is the host + port function needed for? wtc suggested it in comment 9. host+port (e.g. "[2001:db8::1]:8080") will be needed for the HTTP "Host:" header. However, the current plan (with host(), port(), and HostNoBrackets()) sounds good to me, because it gives you the components to assemble whatever you need: - For getaddrinfo(), use HostNoBrackets() - For the "Host:" header, concatenate host() + port() - For hostname canonicalization, use host() - To reassemble the original URL, concatenate ... + host() + port() + ...
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by brettw   -   What is the host + port function needed for?
    What is the host + port function needed for?
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by pmarks@google.com   -   If we did do a host+port function, we'd have to consider when to include ":80". I believe that Firefox will include a :80 iff it was explicitly typed as part of the URL.
    If we did do a host+port function, we'd have to consider when to include ":80". I believe that Firefox will include a :80 iff it was explicitly typed as part of the URL.
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by eroman@chromium.org   -   > What do you think pmarks has proposed the method HostNoBrackets() <http://codereview.chromium.org/113187>
    > What do you think pmarks has proposed the method HostNoBrackets() <http://codereview.chromium.org/113187>
  • May 11, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by wtc@chromium.org   -   Another option is: - Change host() to strip brackets if they exist - Add a method for concatenating a host and a port, for use in the HTTP "Host" header, proxy list, etc. What do you think
    Another option is: - Change host() to strip brackets if they exist - Add a method for concatenating a host and a port, for use in the HTTP "Host" header, proxy list, etc. What do you think
  • May 09, 2009
    issue 7 (GURL: add a PlainHost() method for bracketless IPv6 literals...) commented on by sparkmaul   -   Er, sorry, I'm not very familiar with these tools... It looks like you guys are using the Chromium codereview system for googleurl reviews; please forward your attention to http://codereview.chromium.org/113187
    Er, sorry, I'm not very familiar with these tools... It looks like you guys are using the Chromium codereview system for googleurl reviews; please forward your attention to http://codereview.chromium.org/113187
  • May 09, 2009
    issue 7 (GURL: add a PlainHost() method for bracketless IPv6 literals...) reported by pmarks@google.com   -   A URL can contain an IPv6 address literal, like [2001:db8::2]. Users of the GURL library sometimes need the square brackets, and sometimes don't. My proposed patch adds a PlainHost() method, which returns the hostname with brackets chopped off. Tested using the Chromium source tree: hammer -C build googleurl_unittests --mode=Release hammer -C build googleurl_unittests --mode=Debug
    A URL can contain an IPv6 address literal, like [2001:db8::2]. Users of the GURL library sometimes need the square brackets, and sometimes don't. My proposed patch adds a PlainHost() method, which returns the hostname with brackets chopped off. Tested using the Chromium source tree: hammer -C build googleurl_unittests --mode=Release hammer -C build googleurl_unittests --mode=Debug
  • May 09, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by pmarks@google.com   -   I've discovered another subtlety: When a browser makes an HTTP request, it includes a "Host:" parameter, which may be followed by a port number: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 Thus, a client will need to: - Use 2001:db8::1 when doing an address lookup. - Use [2001:db8::1] when generating the "Host" field for an HTTP request. So, HostForRequest() would be a bad name. My current suggestion is: - leave host() as-is. - Add a PlainHost() which strips brackets if they exist.
    I've discovered another subtlety: When a browser makes an HTTP request, it includes a "Host:" parameter, which may be followed by a port number: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 Thus, a client will need to: - Use 2001:db8::1 when doing an address lookup. - Use [2001:db8::1] when generating the "Host" field for an HTTP request. So, HostForRequest() would be a bad name. My current suggestion is: - leave host() as-is. - Add a PlainHost() which strips brackets if they exist.
  • May 07, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by wtc@chromium.org   -   I agree with pmark's comment 3, but I also realize that changing host() may break some existing code that builds a new URL or a host:port string manually using the components of a URL. Having two host functions would be a good solution. Alternatively we can audit code that manually constructs host:port strings to escape host with [] if host contains a colon.
    I agree with pmark's comment 3, but I also realize that changing host() may break some existing code that builds a new URL or a host:port string manually using the components of a URL. Having two host functions would be a good solution. Alternatively we can audit code that manually constructs host:port strings to escape host with [] if host contains a colon.
  • May 07, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by eroman@chromium.org   -   > We already have GURL.PathForRequest. How about adding HostForRequest? As an aside, note that chromium at least does not use this. Instead it is using HttpUtil::SpecForRequest(). > This would be a departure form the way everything works and there are some cases in the code that we > would now have to modify to be IPv6 aware that don't right now. Yeah, there are definitely callers that aren't expecting that... Wan-Teh also felt host() should return without brackets.
    > We already have GURL.PathForRequest. How about adding HostForRequest? As an aside, note that chromium at least does not use this. Instead it is using HttpUtil::SpecForRequest(). > This would be a departure form the way everything works and there are some cases in the code that we > would now have to modify to be IPv6 aware that don't right now. Yeah, there are definitely callers that aren't expecting that... Wan-Teh also felt host() should return without brackets.
  • May 07, 2009
    issue 2 (IPv6 string literals need canonicalization) commented on by pmarks@google.com   -   > How about adding HostForRequest? Hm... that sounds good to me. It will also be necessary to audit the Chromium code and figure out which host function to call in each place.
    > How about adding HostForRequest? Hm... that sounds good to me. It will also be necessary to audit the Chromium code and figure out which host function to call in each place.