Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
p1_utils
p1_utils-1.0.25-p1_http.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File p1_utils-1.0.25-p1_http.patch of Package p1_utils
diff -Ndurp p1_utils-1.0.25/src/p1_http.erl p1_utils-1.0.25-p1_http/src/p1_http.erl --- p1_utils-1.0.25/src/p1_http.erl 2022-05-02 13:19:45.000000000 +0300 +++ p1_utils-1.0.25-p1_http/src/p1_http.erl 2022-06-13 02:29:18.065973156 +0300 @@ -202,25 +202,15 @@ post(URL, Body) -> %% @see request/4 -spec post(string(), headers(), string()) -> result(). post(URL, Hdrs, Body) -> - NewHdrs = case [X - || {X, _} <- Hdrs, - 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). -%% This function is copied from ejabberd's str.erl: --spec to_lower(binary()) -> binary(); - (char()) -> char(). - -to_lower(B) when is_binary(B) -> - iolist_to_binary(string:to_lower(binary_to_list(B))); -to_lower(C) -> - string:to_lower(C). +-spec to_lower(binary()|string()) -> string(). +to_lower(B) when is_binary(B) -> string:to_lower(binary_to_list(B)); +to_lower(S) -> string:to_lower(S). %% @doc Sends a request without a body. %% Would be the same as calling `request(Method, URL, Hdrs, [], [])',
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