You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using libcurl multi handle with the PUSHFUNCTION option set to allow PUSH_PROMISE frames, if you call curl_get_info(handle, CURLINFO_EFFECTIVE_URL, &result) on one of the handles libcurl created, it returns the URL of the original easy handle.
I don't know if this is the intended behavior or a possible bug, so I'm opening this issue here.
If this is in fact the intended behavior, a new info option to retrieve the pushed data URL would be very helpful, or at least some kind of flag saying this easy handle was created to transfer data pushed by the server.
I know this is possible by passing a custom structure to the CURLOPT_PRIVATE option of each handle, but in my particular scenario, this option is already bound to something else.
I think it is an omission (bug). The pushed stream gets its 'easy' handle created internally by duplicating the "source stream", which is why it gets that particular effective URL. It simply isn't updated to the correct URL.
It probably makes sense for curl to create the URL proper to allow CURLINFO_EFFECTIVE_URL to work exactly the way you tried to use it.
...previously CURLINFO_EFFECTIVE_URL would report the URL of the
original "mother transfer", not the actually pushed resource.
Reported-by: Jonathan Cardoso Machado
Fixes#5589
...previously CURLINFO_EFFECTIVE_URL would report the URL of the
original "mother transfer", not the actually pushed resource.
Reported-by: Jonathan Cardoso Machado
Fixes#5589
When using libcurl multi handle with the PUSHFUNCTION option set to allow PUSH_PROMISE frames, if you call
curl_get_info(handle, CURLINFO_EFFECTIVE_URL, &result)
on one of the handles libcurl created, it returns the URL of the original easy handle.I don't know if this is the intended behavior or a possible bug, so I'm opening this issue here.
If this is in fact the intended behavior, a new info option to retrieve the pushed data URL would be very helpful, or at least some kind of flag saying this easy handle was created to transfer data pushed by the server.
I know this is possible by passing a custom structure to the
CURLOPT_PRIVATE
option of each handle, but in my particular scenario, this option is already bound to something else.I did this
Ran the example at https://curl.haxx.se/libcurl/c/http2-pushinmemory.html with some minor edits:
CURLMOPT_PUSHFUNCTION
callbackcurl_easy_getinfo(e, CURLINFO_EFFECTIVE_URL, &result);
beforecurl_easy_cleanup(e);
in thedo/while
loop.It shows the same URL for all requests.
I expected the following
Different URLs for each easy handle.
curl/libcurl version
operating system
Windows 10 x64
The text was updated successfully, but these errors were encountered: