We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set cache.http_cache = true in leo_gateway.conf then Invoking a delete request to leo_gateway will cause the below error
cache.http_cache = true
[E] [email protected] 2016-06-22 02:01:12.512289 +0000 1466560872 leo_gateway_s3_api:handle_2/6 648 [{key,"bbb/hoge"},{cause,{function_clause,[{leo_gateway_http_commons,'-onresponse/2-fun-4-',[204,[{<<"connection">>,<<"keep-alive">>},{<<"date">>,<<"Wed, 22 Jun 2016 02:01:12 GMT">>},{<<"content-length">>,"0"},{<<"server">>,<<"LeoFS">>}],<<>>,{http_req,#Port<0.2100>,ranch_tcp,keepalive,<0.2234.0>,<<"DELETE">>,'HTTP/1.1',{{127,0,0,1},35347},<<"localhost">>,undefined,8080,<<"/bbb/hoge">>,undefined,<<>>,[],[],[{<<"user-agent">>,<<"curl/7.35.0">>},{<<"host">>,<<"localhost:8080">>},{<<"accept">>,<<"*/*">>}],[],undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,already_called}],[{file,"src/leo_gateway_http_commons.erl"},{line,213}]},{cowboy_req,response,6,[{file,"src/cowboy_req.erl"},{line,1170}]},{cowboy_req,reply_no_compress,8,[{file,"src/cowboy_req.erl"},{line,930}]},{cowboy_req,reply,4,[{file,"src/cowboy_req.erl"},{line,885}]},{leo_gateway_s3_api,handle_2,6,[{file,"src/leo_gateway_s3_api.erl"},{line,645}]},{cowboy_handler,handler_handle,4,[{file,"src/cowboy_handler.erl"},{line,111}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,435}]}]}}] [E] [email protected] 2016-06-22 02:01:12.513300 +0000 1466560872 null:null 0 Error in process <0.2234.0> on node '[email protected]' with exit value: {function_clause,[{leo_gateway_http_commons,'-onresponse/2-fun-4-',[500,[{<<10 bytes>>,<<10 bytes>>},{<<6 bytes>>,<<6 bytes>>},{<<4 bytes>>,<<29 bytes>>},{<<14 bytes>>,"0"}],<<0 bytes>>,{http_req,#Port<0.2100>,ranch_tcp,keepalive,<0.2234.0>,<<6 bytes>>,'HTTP/1.1',{{127,0,0,1},35347},<<9 bytes>>,undefined,8080,<<9 bytes>>,undefined,<<0 bytes>>,undefined,[],[{<<10 bytes>>,<<11 bytes>>},{<<4 bytes>>,<<14 bytes>>},{<<6 bytes>>,<<3 bytes>>}],[],undefined,[],waiting,<<0 bytes>>,undefined... [E] [email protected] 2016-06-22 02:01:12.515289 +0000 1466560872 null:null 0 Ranch listener leo_gateway_s3_api had connection process started with cowboy_protocol:start_link/4 at <0.2234.0> exit with reason: {function_clause,[{leo_gateway_http_commons,'-onresponse/2-fun-4-',[500,[{<<"connection">>,<<"keep-alive">>},{<<"server">>,<<"Cowboy">>},{<<"date">>,<<"Wed, 22 Jun 2016 02:01:12 GMT">>},{<<"content-length">>,"0"}],<<>>,{http_req,#Port<0.2100>,ranch_tcp,keepalive,<0.2234.0>,<<"DELETE">>,'HTTP/1.1',{{127,0,0,1},35347},<<"localhost">>,undefined,8080,<<"/bbb/hoge">>,undefined,<<>>,undefined,[],[{<<"user-agent">>,<<"curl/7.35.0">>},{<<"host">>,<<"localhost:8080">>},{<<"accept">>,<<"*/*">>}],[],undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,already_called}],[{file,"src/leo_gateway_http_commons.erl"},{line,213}]},{cowboy_req,response,6,[{file,"src/cowboy_req.erl"},{line,1170}]},{cowboy_req,reply_no_compress,8,[{file,"src/cowboy_req.erl"},{line,930}]},{cowboy_req,reply,4,[{file,"src/cowboy_req.erl"},{line,885}]},{cowboy_req,maybe_reply,2,[{file,"src/cowboy_req.erl"},{line,995}]},{cowboy_handler,handler_handle,4,[{file,"src/cowboy_handler.erl"},{line,117}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,435}]}]}
due to the below pattern matching. https://github.com/leo-project/leo_gateway/blob/1.2.22/src/leo_gateway_http_commons.erl#L213
Can be fixed by matching not only 200 but also other 20x status codes
The text was updated successfully, but these errors were encountered:
It turned out that LeoFS also need to handle other status codes like 40x, 50x in onresponse handler.
Sorry, something went wrong.
leo-project/leo_gateway@4829a39
mocchira
No branches or pull requests
Set
cache.http_cache = true
in leo_gateway.conf thenInvoking a delete request to leo_gateway will cause the below error
due to the below pattern matching.
https://github.com/leo-project/leo_gateway/blob/1.2.22/src/leo_gateway_http_commons.erl#L213
Can be fixed by matching not only 200 but also other 20x status codes
The text was updated successfully, but these errors were encountered: