mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
OK, i have this code that writes to a socket :

sockwrite -n $sockname GET /users/inh/a.jpg HTTP/1.1
sockwrite -n $sockname Host: danger2you.com $+ $crlf $+ $crlf

and instead of getting the file i want, i get this:

HTTP/1.1 302 Found
Date: Fri, 06 Feb 2004 01:12:25 GMT
Server: Apache/1.3.6 (Unix) PHP/4.3.1 mod_perl/1.21 mod_ssl/2.2.8 OpenSSL/0.9.2b
Location: http://www.danger2you.com/users/inh/a.jpg
Transfer-Encoding: chunked
Content-Type: text/html

dd
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="http://www.danger2you.com/users/inh/a.jpg">here</A>.<P>
</BODY></HTML>

0

the worst part is, wheni test it and get a file from a webserver im runnig locally, it works, so i KNOW its gotta be a quirk in the webserver.

Just curious if anyone has a workaround or knows what im doing wrong, etc....

and yes, ive tried port 8080 instead of 80, and using http/1.0 instead of 1.1, and sending a user agent string identical to the one mozilla and IE use (becuase they have no problem accessing the file) and any combination of the three, but i still get tthe same result...

Joined: Jan 2004
Posts: 133
W
Vogon poet
Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133
try :

sockwrite -n $sockname GET /users/inh/a.jpg HTTP/1.0
sockwrite $sockname Host: danger2you.com $+ $crlf $+ $crlf

HTTP/1.0 < Will Redirect

Joined: Jan 2003
Posts: 31
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jan 2003
Posts: 31
OK, I ifxed it. For some reason, sending danger2you.com in th HOST line doestn work, but www.danger2you.com did, and it sent me what i want. thanks for your help!

Last edited by Insert_Name_Here; 06/02/04 10:45 PM.

Link Copied to Clipboard