Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Can't Post XML to SSL Site

by DapperDan (Pilgrim)
on Oct 15, 2002 at 15:10 UTC ( [id://205396]=note: print w/replies, xml ) Need Help??


in reply to Can't Post XML to SSL Site

Hi-

What you are trying to do is less than totally clear from the question you asked, but I think the solution you found and posted subsequently cleared it up somewhat. From my point of view there are only two possibilities of what you are trying to do:

  1. POST some XML as a parameter of a form, e.g. some XML that was pasted or typed in a HTML <input type="text"> or <textarea> widget.
  2. POST some XML as the body of a HTTP request, with a Content-type header of text/xml (or whatever). This is a perfectly legitimate thing to want to do, particularly if you are building a RESTful web service.

It seems pretty clear from your answer that what you're talking about is no. 2. Care to comment?

While this is an aside (because you got the POST over HTTPS to work and that's probably all that matters to you), I feel compelled to point out that what you're posting isn't XML, it appears to be a string "CLRCMRC_XML=$finalXML", for whatever value of $finalXML. This makes the semantics of the HTTP request quite unclear; the Content-type header is blatantly misleading (or even just 'wrong').

You mightn't give a rat's ass about this because the semantics are in your brain; nonetheless I think I would just give that a mime type of plain text or something in the Content-type header.

Replies are listed 'Best First'.
Re: Re: Can't Post XML to SSL Site
by dpatrick (Scribe) on Oct 26, 2002 at 17:58 UTC
    Check my response to diotalevi above.

    It actually turns out that it is a combination of 1 and 2, as you'll see from the above response. They're doing things in a strange way (the folks who are accepting the XML), I'm guessing possibly so that they can accept other data in other form variables, but this other data could just as easily be added into one XML document...I don't know. Anyway, yes you are right, the Content-type was incorrect, but it was not being parsed on the accepting end anyway. You are also right again in that I'm not posting XML. I'm posting a form, without the proper content-type (which I could, in fact, send anyway if I wanted to because they're not parsing it anyway), with valid XML data in one of the form fields as a string.

    It's weird. But Perl Monks rock!

    dpatrick
    - I think scsh is cool.
    Open Sourceror, Perlmonk
    http://perlmonk.org/~dpatrick

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://205396]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2024-04-16 18:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found