Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by pryrt (Prior)
on Dec 12, 2019 at 18:22 UTC ( #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 (Deacon) 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 (Parson) 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
Node Status?
node history
Node Type: note [id://11110030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-05-28 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (166 votes). Check out past polls.

    Notices?