Robert Lupton the Good <[EMAIL PROTECTED]> writes: > This appears to be an over-enthusistic interpretation of %26 == '&' > in wget. > > I submit a URL (which is in fact a SQL query) with some embedded &s > (logical ORs). These are encoded as %26, and the URL works just fine > with netscape and lynx. It fails with wget. > > Note that wget rewrites > Where+((A.status+%26+0x4)+=+0&format=csv > as > Where ((A.status & 0x4) = 0 > which is a problem. > > wi:wget-1.8.1>src/wget --version > GNU Wget 1.8.1
Odd. Earlier versions of Wget did this, but 1.8.1 shouldn't. For me that doesn't seem to happen: $ wget 'http://fly.srk.fer.hr/Where+((A.status+%26+0x4)+=+0&format=csv' -d DEBUG output created by Wget 1.8.1 on linux-gnu. --04:10:12-- http://fly.srk.fer.hr/Where+((A.status+%26+0x4)+=+0&format=csv => `Where+((A.status+&+0x4)+=+0&format=csv' Resolving fly.srk.fer.hr... done. Caching fly.srk.fer.hr => 161.53.70.130 Connecting to fly.srk.fer.hr[161.53.70.130]:80... connected. Created socket 3. Releasing 0x807b9e8 (new refcount 1). ---request begin--- GET /Where+((A.status+%26+0x4)+=+0&format=csv HTTP/1.0 ... Looks ok to me. In your example, I also don't quite see the problem; the URL specified on the command line is identical to the one "rewritten" by Wget: > wi:wget-1.8.1>src/wget -O - >'http://skyserver.sdss.org/en/tools/search/x_sql.asp?cmd=+select+top+10+A.run,+A.camCol,+A.field,+str(A.rowc,7,2)+as+rowc,+str(A.colc,7,2)+as+colc,+str(dbo.fObjFromObjID(A.ObjId),+4)+as+id,+B.run,+B.camCol,+B.field,+str(B.rowc,7,2)+as+rowc,+str(B.colc,7,2)+as+colc,+str(dbo.fObjFromObjID(B.ObjId),+4)+as+id,+str(A.u,+5,3)+as+Au,+str(A.g,+5,3)+as+Ag,+str(A.r,+5,3)+as+Ar,+str(A.i,+5,3)+as+Ai,+str(A.u+-+B.u,+5,3)+as+du,+str(A.g+-+B.g,+5,3)+as+dg,+str(A.r+-+B.r,+5,3)+as+dr,+str(A.i+-+B.i,+5,3)+as+di+from+photoObj+as+A,+photoObj+as+B,+Neighbors+as+ObjN+Where+((A.status+%26+0x4)+=+0&format=csv' > --16:24:15-- >http://skyserver.sdss.org/en/tools/search/x_sql.asp?cmd=+select+top+10+A.run,+A.camCol,+A.field,+str(A.rowc,7,2)+as+rowc,+str(A.colc,7,2)+as+colc,+str(dbo.fObjFromObjID(A.ObjId),+4)+as+id,+B.run,+B.camCol,+B.field,+str(B.rowc,7,2)+as+rowc,+str(B.colc,7,2)+as+colc,+str(dbo.fObjFromObjID(B.ObjId),+4)+as+id,+str(A.u,+5,3)+as+Au,+str(A.g,+5,3)+as+Ag,+str(A.r,+5,3)+as+Ar,+str(A.i,+5,3)+as+Ai,+str(A.u+-+B.u,+5,3)+as+du,+str(A.g+-+B.g,+5,3)+as+dg,+str(A.r+-+B.r,+5,3)+as+dr,+str(A.i+-+B.i,+5,3)+as+di+from+photoObj+as+A,+photoObj+as+B,+Neighbors+as+ObjN+Where+((A.status+%26+0x4)+=+0&format=csv What am I missing?