Re: [twsocket] HTTP 401 missing header line
Scrive Wilfried Mestdagh wilfr...@mestdagh.biz: Hi Angus, Yes indeed, I found out already. The authentication is an argument in the POST command. When it is invalid or missing the server returns a 401 with the missing header line. Is that a bug in the server? Probably it is a bug in the server. The application called through the web server need an authentication. If it is missing or wrong then it return a 401 trying to tell the client the reason of the fault. But since the authentication is not done at http level it can't add the WWW-Authenticate header line with the methods accepted. IMHO this is wrong. Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HTTP 401 missing header line
I'm trying to POST to a server that needs authentication. I expect a 401 from the server with in the header something like: WWW-Authenticate: Basic Realm=/something This is a pure guess, but maybe the WWW-Authenticate header is only returned for GET requests, with POST you are supposed to know that authentication is needed and send the Authorization: command with the request? Request/sms/smsmessaging/outbound/tel:+32473042292/requests/Reque I'm just writing a Delphi component to send SMS messages via HTTP and a GSM modem, with a queue in case there are delivery problems. The two UK providers I'm initially supporting (Kapow and TextMagic) both pass authentication as arguments in the GET or POST strings, rather than using the Authorization: command. If you have a test account and documentation for your provider, adding a third provider will be easy. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HTTP 401 missing header line
Hi Angus, Yes indeed, I found out already. The authentication is an argument in the POST command. When it is invalid or missing the server returns a 401 with the missing header line. Is that a bug in the server? -- mvg, Wilfried http://www.mestdagh.biz http://www.comfortsoftware.be http://www.expertsoftware.be -Oorspronkelijk bericht- Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens Angus Robertson - Magenta Systems Ltd Verzonden: zondag 18 september 2011 15:10 Aan: twsocket@elists.org Onderwerp: Re: [twsocket] HTTP 401 missing header line I'm trying to POST to a server that needs authentication. I expect a 401 from the server with in the header something like: WWW-Authenticate: Basic Realm=/something This is a pure guess, but maybe the WWW-Authenticate header is only returned for GET requests, with POST you are supposed to know that authentication is needed and send the Authorization: command with the request? Request/sms/smsmessaging/outbound/tel:+32473042292/requests/Reque I'm just writing a Delphi component to send SMS messages via HTTP and a GSM modem, with a queue in case there are delivery problems. The two UK providers I'm initially supporting (Kapow and TextMagic) both pass authentication as arguments in the GET or POST strings, rather than using the Authorization: command. If you have a test account and documentation for your provider, adding a third provider will be easy. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HTTP 401 missing header line
Angus Robertson - Magenta Systems Ltd wrote: The authentication is an argument in the POST command. When it is invalid or missing the server returns a 401 with the missing header line. Is that a bug in the server? The two SMS providers I'm testing provide a range of error messages including bad authentication or no credit, but not 401. Don't know about the general case of cof POST requests, it must be in the RFC? When authentication is required and 401 is returned it's not plain HTTP. They may intend to force callers to send credentials with the first request in order to safe some resources, that however should be documented somewhere. At least you need to know what authentication method is required before hand if the server never returns the accepted. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be