Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
p1_utils
p1_utils-1.0.18-p1_http.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File p1_utils-1.0.18-p1_http.patch of Package p1_utils
diff -Ndurp p1_utils-1.0.18/src/p1_http.erl p1_utils-1.0.18-p1_http/src/p1_http.erl --- p1_utils-1.0.18/src/p1_http.erl 2020-02-25 15:08:46.000000000 +0200 +++ p1_utils-1.0.18-p1_http/src/p1_http.erl 2020-07-13 22:33:14.299574334 +0300 @@ -294,13 +294,8 @@ post(URL, Body) -> %% @see request/4 -spec post(string(), headers(), string()) -> result(). post(URL, Hdrs, Body) -> - NewHdrs = case [X - || {X, _} <- Hdrs, - str:to_lower(X) == <<"content-type">>] - of - [] -> - [{<<"content-type">>, <<"x-www-form-urlencoded">>} - | Hdrs]; + NewHdrs = case [X || {X, _} <- Hdrs, to_lower(X) =:= "content-type"] of + [] -> [{<<"content-type">>, <<"x-www-form-urlencoded">>} | Hdrs]; _ -> Hdrs end, request(post, URL, NewHdrs, Body). @@ -356,3 +351,5 @@ request(Method, URL, Hdrs, Body) -> % When making an asynchronous request the body will always be received as a binary. % lhttpc: always binary +to_lower(B) when is_binary(B) -> string:to_lower(binary_to_list(B)); +to_lower(S) -> string:to_lower(S).
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor