[ic] Reading the HTTP body from a post?
James Guillot
interchange-users@icdevgroup.org
Fri Sep 20 15:12:00 2002
From: Mike Heins <mike@perusion.com>
To: interchange-users@icdevgroup.org
Subject: Re: [ic] Reading the HTTP body from a post?
Send reply to: interchange-users@icdevgroup.org
Date sent: Fri, 20 Sep 2002 13:22:13 -0400
> Quoting James Guillot (james.guillot@huntforpro.com):
> > Hi All,
> > What is the best way to read the body of an HTTP POST into an
> > interchange script? (I tried [CGI...] but it only seems to work if th=
e body of the
> > message is something like foo=3D<?xml....). Here is an example of the=
message I'm
> > sending to Apache/Interchange:
> >
> > POST /cgi-bin/risonline/punchout/setup.html HTTP/1.1
> > Host: www.rustonind.com
> > Connection: Keep-Alive
> > From: jwguillot@huntforpro.com
> > User-Agent: putty/0.52
> > Content-Type: application/x-www-form-urlencoded
> > Content-Length: 1281
> >
> > <?xml version=3D"1.0"?><!DOCTYPE cXML SYSTEM "cXML.dtd"><cXML
> > version=3D"1.0" payloadID=3D"2002-04-03T16:10:15-08:00"
> > timestamp=3D"2002-04-03T16:10:15-08:00">
> > <Header>.......
>
> That isn't a POST of a content-type of x-www-form-urlencoded. It is a
> PUT. A POST is a key/variable pair setup, with url encoding of the
> data (i.e. %22 instead of ").
>
> In other words, this is not compliant with HTTP spec so there is no
> way Interchange would recognize it.
>
> --
> Mike Heins
> Perusion -- Expert Interchange Consulting http://www.perusion.com/
> phone +1.513.523.7621 <mike@perusion.com>
>
> Friends don't let friends use Outlook. -- Bob Blaylock
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
Of course, you=92re right Mike! I'm using telnet to simulate a PunchOutSet=
upRequest
message and unintentionally had the wrong content type. I copied this dir=
ectly from
cXML.org's user guide. How can I access the body of a message like this f=
rom
within interchange? Thanks again!
"An HTTP transmission of a cXML document might include the following MIME =
and
HTTP headers.
POST /cXML HTTP/1.0
Content-Type: text/xml; charset=3D"UTF-8"
Content-Length: 1862
Accept: text/html, image/gif, image/jpeg, *;q=3D.2, */*;q=3D.2
User-Agent: Java1.1
Host: localhost:8080
Connection: Keep-Alive
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
......"James W. Guillot
IS Manager
Hunt Forest Products, Inc.
jwguillot@huntforpro.com