search for: set_header

Displaying 8 results from an estimated 8 matches for "set_header".

Did you mean: get_header
2008 Jun 12
1
setting request headers via get()
Hey all, Found a email thread from Jan 2007 discussing the inability to set request headers (like ETag and If-Modified-Since) through the API, and this is something that''s bothering me a bit. Currently the "way" to do this is to subclass Mechanize and override set_headers(). That seems fine for headers that you''d like to send in every request or for classes of request, but is inconvenient for request-specific headers like ETag and If-Modified-Since. I''ve got a branch up on github with a (fairly invasive, though totally backwards-compatible) patch...
2008 Jan 16
3
settings headers in mechanize
hi, a potential mechanize user here. i''ve looked at the API but it''s not clear what capacity there is to arbitrarily set the headers - does mechanize allow for this? mechanize is clearly great for web browsing, but i also need to construct get and post requests from scratch. i''ve looked at net:http, libcurl, openuri, but mechanize seems simpler and more functional than
2006 Apr 04
0
Need help debugging (long)
Thanks! This is in regards to bug 3084, I am trying to find out why samba is crashing. I am using glibc-2.4 with nptl threads. It seems to be a memory or threading issue. Thanks for any help. Running smbd through gdb: Breakpoint 6, charset_name (ch=CH_DISPLAY) at lib/charcnv.c:57 57 const char *ret = NULL; (gdb) Continuing. Substituting charset 'ANSI_X3.4-1968' for
2015 Aug 27
2
Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
I have both the PJSIP add and the chan_sip way of adding SIP headers in there. The Verbose is showing the variable value is there. The INVITE to PJSIP/Agent1 does not include either X-My-DNID or X-My-DNID2 headers. exten => 1234,1,Verbose(X-My-DNID:${MY_DNID}) same => n,Set(X-My-DNID=${MY_DNID}) same => n,Set(PJSIP_HEADER(add,X-My-DNID2)=${MY_DNID}) same => n,Dial(PJSIP/Agent1)
2008 Jul 10
1
custom http headers in form.submit / upload without original form
Heyas :) I''m wondering how do I do to send my custom HTTP headers when posting a form. agent.set_headers is a private method and I don''t know how to get a reference to HTTPHeaders to use add_field and such. Since my request is a form, I''m sending it using agent.submit(form). Any hints? Bonus question: I would like to upload a file to a REST webservice, but I haven''t found...
2020 Jul 14
3
[PATCH nbdkit RFC 0/2] curl: Implement authorization scripts.
This is an RFC only, at the very least it lacks tests. This implements a rather complex new feature in nbdkit-curl-plugin allowing you to specify an external shell script that can be used to fetch an authorization token for services which requires a token or cookie for access, especially if that token must be renewed periodically. The motivation can be seen in the changes to the docs in patch 2.
2020 Jul 14
0
[PATCH nbdkit RFC 2/2] curl: Implement authorization scripts.
...l_unload(). */ +void +auth_script_unload (void) +{ + string_vector_iter (&script_headers, (void *) free); + string_vector_iter (&script_cookies, (void *) free); + free (script_headers.ptr); + free (script_cookies.ptr); +} + +static int run_auth_script (struct curl_handle *); +static int set_headers (struct curl_handle *); +static int set_cookies (struct curl_handle *); + +/* This is called from any thread just before we make a curl request. + * The caller checks that auth_script != NULL before calling. + * + * The job of this is two-fold: (1) If we need to run the auth_script + * (either for...
2007 Jan 04
5
Help accessing http headers?
Hi, I''m using Mechanize, and I''ve developed a lot of code around it. I''d like to be able to check the Etag header during a get to see if the page has changed, as well as some other http header information. Can I do that without hacking Mechanize myself? Does anyone have any examples of how to do this? William