|
|
| Author |
Message |
< Erlang bugs mailing list ~ gen_tcp/new_ssl http packet inconsistency when reading malfo |
| Guest |
Posted: Mon Jun 21, 2010 2:45 pm |
|
|
|
Guest
|
The new_ssl and gen_tcp sockets does not return
http packet decode errors in the same way.
How to repeat:
1. Run a ssl(new_ssl)/gen_tcp server with the http packet option set
2. Send a http request with a malformed header field to the server
new_ssl/gen_tcp will return different values when
reading the header:
ssl:recv(SSLSocket, 0) -> {ok, {http_error, _Str}}
gen_tcp:recv(Socket, 0) -> {error, {http_error, _Str}}
Erlang version: R13B04 (no fix mentioned in in the release notes of R14A).
/Jonas
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Jun 22, 2010 9:06 am |
|
|
|
Guest
|
Hi!
Thank you for reporting this, we will change ssl to work the same way as
gen_tcp.
Regards Ingela Erlang/OTP team - Ericsson AB
Jonas Boberg wrote:
> The new_ssl and gen_tcp sockets does not return
> http packet decode errors in the same way.
>
> How to repeat:
> 1. Run a ssl(new_ssl)/gen_tcp server with the http packet option set
> 2. Send a http request with a malformed header field to the server
>
> new_ssl/gen_tcp will return different values when
> reading the header:
> ssl:recv(SSLSocket, 0) -> {ok, {http_error, _Str}}
> gen_tcp:recv(Socket, 0) -> {error, {http_error, _Str}}
>
> Erlang version: R13B04 (no fix mentioned in in the release notes of R14A).
>
> /Jonas
> ---------------------------------------------------
>
> ---------------------------------------------------
>
> WE'VE CHANGED NAMES!
>
> Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
>
> www.erlang-solutions.com
>
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
>
>
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Jun 22, 2010 1:29 pm |
|
|
|
Guest
|
Hi again!
Maybe I spoke to early. I according to the documentation:
"A socket in passive mode will return {ok, HttpPacket} from gen_tcp:recv"
"HttpPacket = HttpRequest | HttpResponse | HttpHeader | http_eoh |
HttpError"
"HttpError = {http_error, HttpString}"
So ssl does acctualy return what the documentation says it should.
I am not sure if we dare change the gen_tcp:recv or not but that would
be the "right" thing to do.
Regards Ingela Erlang/OTP team - Ericsson AB
Ingela Anderton Andin wrote:
> Hi!
>
> Thank you for reporting this, we will change ssl to work the same way
> as gen_tcp.
>
> Regards Ingela Erlang/OTP team - Ericsson AB
>
> Jonas Boberg wrote:
>> The new_ssl and gen_tcp sockets does not return
>> http packet decode errors in the same way.
>>
>> How to repeat:
>> 1. Run a ssl(new_ssl)/gen_tcp server with the http packet option set
>> 2. Send a http request with a malformed header field to the server
>>
>> new_ssl/gen_tcp will return different values when reading the header:
>> ssl:recv(SSLSocket, 0) -> {ok, {http_error, _Str}}
>> gen_tcp:recv(Socket, 0) -> {error, {http_error, _Str}}
>> Erlang version: R13B04 (no fix mentioned in in the release notes of
>> R14A).
>>
>> /Jonas
>> ---------------------------------------------------
>>
>> ---------------------------------------------------
>>
>> WE'VE CHANGED NAMES!
>>
>> Since January 1st 2010 Erlang Training and Consulting Ltd. has become
>> ERLANG SOLUTIONS LTD.
>>
>> www.erlang-solutions.com
>>
>>
>> ________________________________________________________________
>> erlang-bugs (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
>>
>>
>
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
>
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Jun 23, 2010 9:14 am |
|
|
|
Guest
|
Ingela Anderton Andin wrote:
> Maybe I spoke to early. I according to the documentation:
> "A socket in passive mode will return {ok, HttpPacket} from gen_tcp:recv"
> ...
> So ssl does acctualy return what the documentation says it should.
Yes, actually dialyzer even gives a warning for this code in R13B04:
case gen_tcp:recv(Socket, 0, 1000) of
%% dialyzer gives a warning for the following line, but its "correct" in R13B
{error, {http_error, _Str}} ->
...
end
If it's not possible to change the gen_tcp behaviour, I guess the documentation
and type specs should be updated.
/Jonas
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@erlang.org
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
Post received from mailinglist |
|
|
| Back to top |
|
| wailian |
Posted: Tue Mar 20, 2012 2:14 am |
|
|
|
Guest
|
| i/p transducer requires a standard input and is for use with linear pneumatic actuators and has high air capacity. It can be easy change of the output signal from. electro pneumatic transducer is used, for example, in the biomedical field for the pneumatic control of a cardiac module, or artificial heart. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|