Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Perl web service consumed by c# client returns null.

by pryrt (Abbot)
on Dec 12, 2019 at 18:22 UTC ( [id://11110030]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl web service consumed by c# client returns null.
in thread Perl web service consumed by c# client returns null.

It looks as if the web service fails to provide a Content-Type header, but the client expects one.

I'm not the original Anonymous Monk, but will respond: I would have thought the same thing, except that the error message is included in the message, and appears to be showing the content that the client received. That message shows not one but two Content-Type headers. If the error message isn't showing what was received from the service, but some other content, I would be confused as a user of that client.

I'm wondering if seeing two Content-Type headers instead of one-and-only-one is confusing the client. Or maybe the headers don't have the expected newline sequence, so it shows up when printed as being on multiple lines, but the client either sees it as one line or sees extra characters at the start or end of each of the header lines.

(edit first paragraph for clarity)

  • Comment on Re^2: Perl web service consumed by c# client returns null.

Replies are listed 'Best First'.
Re^3: Perl web service consumed by c# client returns null.
by haj (Vicar) on Dec 12, 2019 at 19:15 UTC

    Ah, indeed. Thanks for pointing that out!

    So the first header is Content-type (with a lowercase "t" in type), and it seems to come before the HTTP 1.1 line. This is an invalid HTTP response and might cause the client to abort parsing. If that's the case, then the error message isn't as good as it could be...

Re^3: Perl web service consumed by c# client returns null.
by bliako (Monsignor) on Dec 12, 2019 at 18:44 UTC

    That or the client does not see headers at all. Header items should be separated by \r\n . The end of headers is denoted by \r\n\r\n

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-25 07:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found