You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Liam Sharp (JIRA)" <ji...@apache.org> on 2018/04/23 13:23:00 UTC

[jira] [Updated] (HTTPCORE-522) Comma in url breaks BasicHeaderValueParser.parseElements

     [ https://issues.apache.org/jira/browse/HTTPCORE-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Liam Sharp updated HTTPCORE-522:
--------------------------------
    Description: 
Passing a link header containing a comma to BasicHeaderValueParser.parseElements results in two HeaderElement's rather than one, eg:


String linkHeader = "<http://www.example.com/foo,bar.html>; rel=\"canonical\"";
final HeaderElement[] parsedHeaders = BasicHeaderValueParser.parseElements(linkHeader, null);

for (HeaderElement headerElement : parsedHeaders)
{
    System.out.println(headerElement);
}

Produces:

<http://www.example.com/foo
bar.html>; rel=canonical

 

 

  was:
Passing a link header containing a comma to BasicHeaderValueParser.parseElements results in two HeaderElement's rather than one, eg:


{{String linkHeader = "<http://www.example.com/foo,bar.html>; rel=\"canonical\"";
final HeaderElement[] parsedHeaders = BasicHeaderValueParser.parseElements(linkHeader, null);

for (HeaderElement headerElement : parsedHeaders)
{
    System.out.println(headerElement);
}
}}
Produces:

<http://www.example.com/foo
bar.html>; rel=canonical

 

 


> Comma in url breaks BasicHeaderValueParser.parseElements
> --------------------------------------------------------
>
>                 Key: HTTPCORE-522
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-522
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.4.9
>            Reporter: Liam Sharp
>            Priority: Major
>
> Passing a link header containing a comma to BasicHeaderValueParser.parseElements results in two HeaderElement's rather than one, eg:
> String linkHeader = "<http://www.example.com/foo,bar.html>; rel=\"canonical\"";
> final HeaderElement[] parsedHeaders = BasicHeaderValueParser.parseElements(linkHeader, null);
> for (HeaderElement headerElement : parsedHeaders)
> {
>     System.out.println(headerElement);
> }
> Produces:
> <http://www.example.com/foo
> bar.html>; rel=canonical
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org