diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-06-01 15:52:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-06-24 23:44:42 +0200 |
commit | f65ab8864e2f9d580daf0ca48c972d6124a2ff3d (patch) | |
tree | baa0c14a5de151b3c48df583be255b57986fc41b /docs/libcurl | |
parent | feea9263e9066768323a759ee178c144fccf5998 (diff) |
http2: fixed the header accessor functions for the push callback
Diffstat (limited to 'docs/libcurl')
-rw-r--r-- | docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 index a46150ab7..0e4e3326e 100644 --- a/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 +++ b/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3 @@ -27,15 +27,8 @@ CURLMOPT_PUSHFUNCTION \- approve or deny server pushes .nf #include <curl/curl.h> -struct curl_headerpair { - unsigned char *name; /* zero terminated name */ - size_t namelen; /* length of 'name' */ - unsigned char *value; /* zero terminated name */ - size_t valuelen; /* length of 'value' */ -}; - -struct curl_headerpair *curl_pushheader_bynum(push_headers, int num); -struct curl_headerpair *curl_pushheader_byname(push_headers, char *name); +char *curl_pushheader_bynum(push_headers, int num); +char *curl_pushheader_byname(push_headers, char *name); int curl_push_callback(CURL *parent, CURL *easy, @@ -78,12 +71,12 @@ functions. These functions can only be used from within this callback and they can only access the PUSH_PROMISE headers. The normal response headers will be pased to the header callback for pushed streams just as for normal streams. .IP curl_pushheader_bynum -Returns the header pair at index 'num' (or NULL). The returned pointer points -to a struct that will be freed when this callback returns. +Returns the header at index 'num' (or NULL). The returned pointer points +to a "name:value" string that will be freed when this callback returns. .IP curl_pushheader_byname -Returns the header pair for the given header name (or NULL). This is a -shortcut so that the application doesn't have to loop through all headers to -find the one it is interested in. +Returns the value for the given header name (or NULL). This is a shortcut so +that the application doesn't have to loop through all headers to find the one +it is interested in. .SH CALLBACK RETURN VALUE .IP "CURL_PUSH_OK (0)" The application has accepted the stream and it can now start receiving data, |