[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2: Support trailer fields #564

Closed
wants to merge 1 commit into from

Commits on Dec 14, 2015

  1. http2: Support trailer fields

    This commit adds trailer support in HTTP/2.  In HTTP/1.1, chunked
    encoding must be used to send trialer fields.  HTTP/2 deprecated any
    trandfer-encoding, including chunked.  But trailer fields are now
    always available.
    
    Since trailer fields are relatively rare these days (gRPC uses them
    extensively though), allocating buffer for trailer fields is done when
    we detect that HEADERS frame containing trailer fields is started.  We
    use Curl_add_buffer_* functions to buffer all trailers, just like we
    do for regular header fields.  And then deliver them when stream is
    closed.  We have to be careful here so that all data are delivered to
    upper layer before sending trailers to the application.
    
    We can deliver trailer field one by one using NGHTTP2_ERR_PAUSE
    mechanism, but current method is far more simple.
    
    Another possibility is use chunked encoding internally for HTTP/2
    traffic.  I have not tested it, but it could add another overhead.
    tatsuhiro-t committed Dec 14, 2015
    Configuration menu
    Copy the full SHA
    f7bd526 View commit details
    Browse the repository at this point in the history