hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-124) application-controlled HeaderValueParser
Date Sun, 04 Nov 2007 13:46:50 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540068
] 

Oleg Kalnichevski commented on HTTPCORE-124:
--------------------------------------------

protected void splitNextHeader()
    throws ParseException {

    if (!this.headerIt.hasNext()) {
        this.currentElements = null;
        this.currentElement  = null;
        return;
    }

    Header nhdr  = this.headerIt.nextHeader();
    CharArrayBuffer buffer;
    int pos; 
    if (nhdr instanceof FormattedHeader) {
        buffer = ((FormattedHeader) nhdr).getBuffer();
        pos = ((FormattedHeader) nhdr).getValuePos();
    } else {
        String value = nhdr.getValue();
        buffer = new CharArrayBuffer(value.length());
        pos = 0;
    }
    ParserCursor cursor = new ParserCursor(0, buffer.length());
    cursor.updatePos(pos);
    HeaderValueParser parser = BasicHeaderValueParser.DEFAULT;
    this.currentElements = parser.parseElements(buffer, cursor);
    this.currentElementIdx = 0;


> application-controlled HeaderValueParser
> ----------------------------------------
>
>                 Key: HTTPCORE-124
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-124
>             Project: HttpComponents Core
>          Issue Type: Improvement
>    Affects Versions: 4.0-alpha6
>            Reporter: Roland Weber
>            Assignee: Roland Weber
>            Priority: Trivial
>             Fix For: 4.0-beta1
>
>         Attachments: 2k7-10-14-hdr-parser.txt, 2k7-11-04-hdr-parser-2.txt
>
>
> As briefly mentioned elsewhere, it would be consistent if the header value parser can
be set on all headers, not just on BufferedHeader.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message