{"action":"created","issue":{"url":"https://api.github.com/repos/tatsuhiro-t/nghttp2/issues/432","labels_url":"https://api.github.com/repos/tatsuhiro-t/nghttp2/issues/432/labels{/name}","comments_url":"https://api.github.com/repos/tatsuhiro-t/nghttp2/issues/432/comments","events_url":"https://api.github.com/repos/tatsuhiro-t/nghttp2/issues/432/events","html_url":"https://github.com/tatsuhiro-t/nghttp2/issues/432","id":118273143,"number":432,"title":"Continuation Frame","user":{"login":"valour01","id":5527468,"avatar_url":"https://avatars.githubusercontent.com/u/5527468?v=3","gravatar_id":"","url":"https://api.github.com/users/valour01","html_url":"https://github.com/valour01","followers_url":"https://api.github.com/users/valour01/followers","following_url":"https://api.github.com/users/valour01/following{/other_user}","gists_url":"https://api.github.com/users/valour01/gists{/gist_id}","starred_url":"https://api.github.com/users/valour01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valour01/subscriptions","organizations_url":"https://api.github.com/users/valour01/orgs","repos_url":"https://api.github.com/users/valour01/repos","events_url":"https://api.github.com/users/valour01/events{/privacy}","received_events_url":"https://api.github.com/users/valour01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-22T16:27:36Z","updated_at":"2015-11-23T03:42:07Z","closed_at":null,"body":"It seems nghttp2 will handle the `continuation frame` internally and seen them as a single frame with `headers frame`. I am interested in this part. I am wondering how I can I split a `headers frame` into many `continuation frames` using the nghttp2 api or change the api inside. Could you give me some hint or tell me the related code on handling this.\r\n\r\nAnd also, it seems that in the api \r\n\r\n    int32_t nghttp2_submit_request(nghttp2_session *session, const nghttp2_priority_spec *pri_spec, const nghttp2_nv *nva, size_t nvlen, const nghttp2_data_provider *data_prd, void *stream_user_data)\r\n\r\nif the `data_prd` is NULL, then the `headers frame` has a flag as end_stream. Does it mean that if I want to set the the end_stream to be false I have to set the `data_prd` to be something?"},"comment":{"url":"https://api.github.com/repos/tatsuhiro-t/nghttp2/issues/comments/158846479","html_url":"https://github.com/tatsuhiro-t/nghttp2/issues/432#issuecomment-158846479","issue_url":"https://api.github.com/repos/tatsuhiro-t/nghttp2/issues/432","id":158846479,"user":{"login":"tatsuhiro-t","id":404610,"avatar_url":"https://avatars.githubusercontent.com/u/404610?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuhiro-t","html_url":"https://github.com/tatsuhiro-t","followers_url":"https://api.github.com/users/tatsuhiro-t/followers","following_url":"https://api.github.com/users/tatsuhiro-t/following{/other_user}","gists_url":"https://api.github.com/users/tatsuhiro-t/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuhiro-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuhiro-t/subscriptions","organizations_url":"https://api.github.com/users/tatsuhiro-t/orgs","repos_url":"https://api.github.com/users/tatsuhiro-t/repos","events_url":"https://api.github.com/users/tatsuhiro-t/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuhiro-t/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T03:42:07Z","updated_at":"2015-11-23T03:42:07Z","body":"CONTINUATION frame is necessary evil to support large header fields, but at the same time keep maximum frame payload size low.  Since encoded header fields can be across frame boundary, it is useless to handle each frame.  We chose to handle them transparently not to show application this messy part of the protocol.\r\n\r\nThat being said, the handling of incoming frames is done by nghttp2_session_mem_recv().\r\nCONTINUATION frame processing is done in https://github.com/tatsuhiro-t/nghttp2/blob/dff2a1995063b29f3338a0be8cfd4bb11609a1a3/lib/nghttp2_session.c#L5662\r\nNote that we call nghttp2_on_begin_frame_callback even for CONTINUATION frame.  If that suffices your usecase, you don't have to change our API at all.\r\n\r\n> if the data_prd is NULL, then the headers frame has a flag as end_stream. Does it mean that if I want to set the the end_stream to be false I have to set the data_prd to be something?\r\n\r\nYes.  You can always set non-NULL data_prd and send 0 bytes of data to achieve the same effect as providing NULL data_prd.  But latter does not need to send empty DATA frame, and it could be an easy optimization.\r\n"}}