What if i want to send cookies;
should i place it in headers if so how should i format the cookies ..,
its where my problem exactly is
COOKIES..?
···
On Thu, 11 Nov 2004 07:10:26 +0900, Mark Hubbart <discordantus@gmail.com> wrote:
Hi,
On Wed, 10 Nov 2004 22:49:20 +0900, Daun Jaun <compsci.isi@gmail.com> wrote:
> Hi
> Can some one please tell me how to encode the headers(HTTP request) in the call
> to HTTP post method
>
> the signature of post was
>
> def Net::Http.post( path, query, header )
>
> But no where in the manual can i found something about this header
> except that its a HASH
It's optional. If you want to include additional http headers, like
the referer, or the size of the data you are posting, call it like
this:
result = server.post("/", data, {"Referer" => "http://example.com",
"Content-Length" => data.size})
If you don't know if you need to send extra headers, then you probably
don't need to So just omit them:
result = server.post("/",data)
HTH,
Mark
>
> Awaiting eagerly for your replies
> Bye
> Daun Jaun
>
>
I am not interested in sending cookies to the browser/client; infact
I am playing the role of a browser here and i want to talk to the server
and in this situation i have to send (stored) cookies (at browser say)
to the program@server
This format or way of doing this is different from the way we play a
server role and send cookies to the client ; its can be
easily done using cgi.out
Unfortunately the same way does not work out with
httpObj.post
And coming to http_access2 its all complex i am unable to understand
Please help me..........
···
On Thu, 11 Nov 2004 16:34:40 +0900, Mark Hubbart <discordantus@gmail.com> wrote:
On Thu, 11 Nov 2004 13:52:51 +0900, Daun Jaun <compsci.isi@gmail.com> wrote:
> What if i want to send cookies;
> should i place it in headers if so how should i format the cookies ..,
> its where my problem exactly is
> COOKIES..?
indeed, I can see now that I answered the wrong question... Still, I'm
wondering if you visited the page I referenced, since it has your
solution on it. To quote:
···
On Thu, 11 Nov 2004 16:57:41 +0900, Daun Jaun <compsci.isi@gmail.com> wrote:
Thanx for ur response;
seems i am not clearly explaining u what i want;
I am not interested in sending cookies to the browser/client; infact
I am playing the role of a browser here and i want to talk to the server
and in this situation i have to send (stored) cookies (at browser say)
to the program@server
This format or way of doing this is different from the way we play a
server role and send cookies to the client ; its can be
easily done using cgi.out
Unfortunately the same way does not work out with
httpObj.post
And coming to http_access2 its all complex i am unable to understand
Please help me..........
---
When requesting a URL from an HTTP server, the browser will match the
URL against all cookies and if any of them match, a line containing
the name/value pairs of all matching cookies will be included in the
HTTP request. Here is the format of that line:
Yeah Edwin
I have peeped in to that code and samples early in the morning
But I am unable to grasp what is exactly goin on ;
I have to figure it out
But I dont want to take help of this http_access2 because I am not
developin a s/w which is as complex as a browser, all my piece of
s/w shud do is be a proxy ( intermediary*&# ) at an application layer
between the browser and the original server
_ _ _ _ _ _ _
Browser | ----------> My Program at local host(say)
- - - - - - - - - |
>
V
···
-------------------------------
> server to which |
> I have to forwar the |
> request |
__________________
Aneway I am currently lookin at the rfc for cookies and also peeing
into http_access i will come back after some time
Now goin to try Marks way ....,
Bye
Daun Jaun
On Thu, 11 Nov 2004 18:58:36 +0900, Mark Hubbart <discordantus@gmail.com> wrote:
On Thu, 11 Nov 2004 16:57:41 +0900, Daun Jaun <compsci.isi@gmail.com> wrote:
> Thanx for ur response;
>
> seems i am not clearly explaining u what i want;
>
> I am not interested in sending cookies to the browser/client; infact
>
> I am playing the role of a browser here and i want to talk to the server
>
> and in this situation i have to send (stored) cookies (at browser say)
>
> to the program@server
>
> This format or way of doing this is different from the way we play a
> server role and send cookies to the client ; its can be
> easily done using cgi.out
> Unfortunately the same way does not work out with
> httpObj.post
>
> And coming to http_access2 its all complex i am unable to understand
>
> Please help me..........
indeed, I can see now that I answered the wrong question... Still, I'm
wondering if you visited the page I referenced, since it has your
solution on it. To quote:
---
When requesting a URL from an HTTP server, the browser will match the
URL against all cookies and if any of them match, a line containing
the name/value pairs of all matching cookies will be included in the
HTTP request. Here is the format of that line:
i was hoping you'd look at http_access2. if you have downloaded
the tar ball and at least looked at the sample dir, you'd get an idea on
how to use cookies. from there, you'd look at webagent or soap4r
and how these beasts manage cookies.
personally, i don;t have time to look at these but you would, since
you have the need.
you need to focus, and not just whine. i'm not trying to dis you.
just hoping that you;d do your part since i spent the time looking
for that darn piece of software you need.
···
On Thu, 11 Nov 2004 17:58:08 +0900, Daun Jaun <compsci.isi@gmail.com> wrote:
Thanx
No Thanx
I have spent more than 6 nites on this ..,
Its after that i have joined this list
If u cant help then y dont u just ignore
cheers
Daun Jaun
On Thu, 11 Nov 2004 17:06:48 +0900, Edwin Eyan Moragas <haaktu@gmail.com> wrote:
> > And coming to http_access2 its all complex i am unable to understand
> >
> > Please help me..........
>
> breastfeeding is only best for babies.
> --
> i'm not flying. i'm falling... in style.
>
>