Re: [squid-users] Re: Malformed Urls

From: Deepa D <deepndharma@dont-contact.us>
Date: Sat, 21 Feb 2004 10:30:16 +0000 (GMT)

 Hi,
   Thanks for the response.
   As the redirector threads are started by squid, I
did a strace on it.
   I noticed the following in the strace output in
case of squid when malformed urls are getting
generated :-
 Case 1)
write(12, "1077360367.332 RELEASE -1 FFFFFF"..., 158)
= 158
read(16, "GET http://java.sun.com/notfound"..., 4095)
= 365
read(6, "\n\n", 8192) = 2
write(6,
"\330\313(\10\334\261\22Bava.sun.com/notfound.jsp"...,
111) = 111
write(17, "GET /notfound.jsp?requrl=/css/co"..., 444)
= 444
read(17, "HTTP/1.1 404 Not found\r\nServer: "...,
87380) = 781
write(16, "HTTP/1.0 404 Not Found\r\nServer: "...,
814) = 814
read(16, "", 4095) = 0
read(17, "<!-- BEGIN VNV1 MASTHEAD COMPONE"..., 87380)
= 1460
read(16, "", 4095) = 0
write(16, "<!-- BEGIN VNV1 MASTHEAD COMPONE"..., 1460)
= 1460
read(17, "\" \" /></td>\n<td valign=\"top\" cla"...,
87380) = 1460
read(16, "", 4095) = 0
write(16, "\" \" /></td>\n<td valign=\"top\" cla"...,
1460) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) ---
write(5, "1077360368.030 693 10.10.10.1"..., 123) =
123
read(16, "", 87380) = 0
write(12, "1077360368.031 RELEASE -1 FFFFFF"..., 160)
= 160
read(16, "GET http://java.sun.com/images/1"..., 4095)
= 315
read(6, "http://localhost:8080/contentfil"..., 8192) =
178
write(6, "\3408>\10://java.sun.com/images/1x1.g"...,
61) = 61
write(17, "GET /contentfilter/login1.jsp?ur"..., 511)
= 511
read(18, "GET http://216.239.57.99/search?"..., 4095)
= 385
read(6, "http://localhost:8080/contentfil"..., 8192) =
128
write(6, "http://216.239.57.99/search?clie"..., 182) =
182
write(19, "GET /contentfilter/login1.jsp?ur"..., 440)
= 440
read(17, "HTTP/1.1 200 OK\r\nDate: Sat, 21 F"...,
87380) = 3879
write(16, "HTTP/1.0 200 OK\r\nDate: Sat, 21 F"...,
3912) = 3912
read(17, " <td> \n "...,
87380) = 1349
write(16, " <td> \n "...,
1349) = 1349
read(16, 0x83d89a8, 4095) = -1
ECONNRESET (Connection reset by peer)

Case 2)
write(12, "1077360407.457 RELEASE -1 FFFFFF"..., 174)
= 174
read(16, "GET http://localhost:8080/conten"..., 4095)
= 348
read(6, "http://localhost:8080/contentfil"..., 8192) =
141
write(6,
"\334\261\22B\334\261\22Bocalhost:8080/contentfil"...,
78) = 78
write(17, "GET /contentfilter/login1.jsp?ur"..., 489)
= 489
read(17, "HTTP/1.1 200 OK\r\nDate: Sat, 21 F"...,
87380) = 3746
write(16, "HTTP/1.0 200 OK\r\nDate: Sat, 21 F"...,
3779) = 3779
read(17, " <td> \n "...,
87380) = 1349
write(16, " <td> \n "...,
1349) = 1349
read(17, "", 87380) = 0
write(5, "1077360407.540 44 10.10.10.1"..., 138) =
138
read(16, 0xbffe7e90, 87380) = -1 EAGAIN
(Resource temporarily unavailable)
write(12, "1077360407.540 RELEASE -1 FFFFFF"..., 178)
= 178
read(16, "GET http://localhost:8080/conten"..., 4095)
= 347
read(6, "http://localhost:8080/contentfil"..., 8192) =
145
write(6,
"\350g>\10\334\261\22Bocalhost:8080/contentfil"...,
77) = 77
write(17, "GET /contentfilter/login1.jsp?ur"..., 494)
= 494
read(17, "HTTP/1.1 200 OK\r\nDate: Sat, 21 F"...,
87380) = 3746
write(16, "HTTP/1.0 200 OK\r\nDate: Sat, 21 F"...,
3779) = 3779
read(17, " <td> \n "...,
87380) = 1349
write(16, " <td> \n "...,
1349) = 1349
read(16, 0x83cc5a8, 4095) = -1
ECONNRESET (Connection reset by peer)

   From this I observe that squid is reading twice and
writing twice. Why does this happen? Is it because the
client is writing to it twice?
   Secondly, I did an strace on the redirector program
but am not getting any output - plz tell me how to do
it.

  Regards and TIA,
       Deepa
 
  

--- Henrik Nordstrom <hno@squid-cache.org> wrote: > On
Fri, 20 Feb 2004, Deepa D wrote:
>
> > Hi All,
> > Using strace I have noticed the following
> problem
> > :-
> > For the mentioned url, I get the HTTP/1.0 204
> > response at one time. But when the sam request is
> > given again, the request is serviced and the page
> > displays properly.
> > read(16, "GET
> http://www.google.com/url?sa"...,
> > 4095) = 674
> > write(6, "http://www.google.com/url?sa=T&s"...,
> 121) =
> > 121
> > read(6, "\n\n", 8192) = 2
>
> I asked you to strace the redirector, not Squid.
>
> as for the 204 question, see output of ngrep or
> other network sniffer to
> see if the traffic between Squid and the server
> differs in any way between
> the two requests.
>
> But what can be said is that in the above the URL is
> sent correctly to the
> redirector (the write 6, ...) and if this got logged
> as a malformed URL by
> your redirector then the redirector is broken.
>
> Regards
> Henrik
>

________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.
Go to: http://in.insurance.yahoo.com/licspecial/index.html
Received on Sat Feb 21 2004 - 03:30:21 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:02 MST