Hi Hentry,
On Wed, Mar 16, 2011 at 4:56 AM, Henry Collingridge <
hen...@m-...> wrote:
> Hi again,
>
> I'm trying to set the HTTP_REFERER header in my conf file using a HEADER
> line as below:
>
>
> URL=https://myurl/submissions/createupload
>
> URL_SHORT_NAME="Upload-POST"
>
> HEADER="Expect: "
>
> HEADER="HTTP_REFERER: https://myurl/account/login"
>
> REQUEST_TYPE=POST
>
> MULTIPART_FORM_DATA="submission[uploaded_content]=@./fixtures/dummyfile.txt"
>
> And it doesn't seem to be working, which is to say my app is checking for
> the header and its not there. I know curl has a command line option to set
> the referer. Is there, perhaps, a way of passing this into curl-loader? Or
> perhaps my syntax is just wrong?
>
It seems, that the syntax is not correct.
There are several examples of how to use it in curl-loader/conf-examples/
, e.g. bax-login-logoff-noncycling.conf and multipart-formdata-post.conf,
etc
Perhaps you'd like to fetch a URL by GET and afterwards to make a POST.
at the same URL.
You are placing URL="" to the POST-part to indicate, that you start
a new URL section for POST-ing a form and URL_USE_CURRENT= 1 to indicate
that you are using the URL resulting from the very previous GET
(it may be some redirections at server).
For example see in the files, e.g.
# GET-part
URL= http://10.30.6.42:8888/vax/root/Admin
URL_SHORT_NAME="Login-GET"
REQUEST_TYPE=GET
TIMER_URL_COMPLETION = 4000
TIMER_AFTER_URL_SLEEP =0
# POST-part
URL=""
URL_SHORT_NAME="Login-POST"
URL_USE_CURRENT= 1
REQUEST_TYPE=POST
etc , etc
Header Expect of HTTP 1.1 makes sense to place to the POST URL
section, whereas it is up to you to decide the place of HTTP_REFERRER,
or it can be sent in both HTTP requests.
You can start with a single client and always use some sniffer like
Wireshark to monitor your progress and actual headers sent.
> Thanks in advance for any help!
>
Take care.
Regards
Robert
>
> Cheers,
>
> Henry
>
> --
> Henry Collingridge
> Senior Market Systems Developer
> NZX Limited
> Level 2, NZX Centre
> 11 Cable St
> Wellington
>
> Direct Line: + 64 4 498 0041
> Mobile: +64 27 450 0109
> Fax: + 64 4 496 2893
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> curl-loader-devel mailing list
> cur...@li...
> https://lists.sourceforge.net/lists/listinfo/curl-loader-devel
>
>
--
Regards,
Robert Iakobashvili, Ph.D.
Home: http://www.ghotit.com
Blog: http://dyslexia-blog.ghotit.com
Twitter: http://twitter.com/ghotit
Facebook: http://facebook.com/ghotit
......................................................................
Ghotit Dyslexia
Assistive technology that understands you
......................................................................
|