curl-users
Re: Problems using cURL
Date: Sun, 08 Apr 2001 16:19:38 -0700
Thanks, I thought that I had tried that already. It may have been the use of "+" for spaces
rather than the "%20" that did the trick.
Thanks,
Dan
Erdmut Pfeifer wrote:
>
> On Sat, Apr 07, 2001 at 09:14:58PM -0700, Dan Dickerson wrote:
> > I am trying to mimic the use of a form:
> > http://www.usps.gov/ncsc/lookups/lookup_zip+4.html
> >
> > I am using cURL ver. 7.7.1 on a WindowsME system. I invoke it with:
> > curl -K curl.txt http://www.usps.com/cgi-bin/zip4/zip4inq2
> >
> > curl.txt is a text file with the following contents:
> > -o addout.html
> > -A "Mozilla/4.76 [en] (Win95; U)"
> > -e "http://www.usps.gov/ncsc/lookups/lookup_zip+4.html"
> > -d "City=&Zip%20Code=91104&Delivery%20Address=1800%20N%20Sierra%20Bonita%20Ave.&Firm=&State=&Submit=Process&Urbanization="
> >
> > When I run this I get the response from the server that the State is incorrect,
> > but when I enter the data from the form, it works just fine. Putting in a valid
> > state does not fix the problem. Furthermore, when entered from the form, putting
> > in an invalid state does not cause problems if the Zip exists.
>
> occasionally, you'll come across some badly written CGI scripts that
> rely on a fixed ordering of fields in the query string...
> I just tried that hypothesis with your data above -- seems to the case
> here, too. So if you specify the fields in the order they appear in the
> form, i.e.
>
> "Firm=&Urbanization=&Delivery+Address=1800+N+Sierra+Bonita+Ave.&City=&State=&Zip+Code=91104&Submit=Process"
>
> things seem to work fine...
>
Received on 2001-04-09