Explorar el Código

don't remove the quotes from the etag

pull/1882/head
Tristan Sloughter hace 6 años
padre
commit
3b88dd7d24
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/rebar_pkg_resource.erl

+ 2
- 2
src/rebar_pkg_resource.erl Ver fichero

@ -135,10 +135,10 @@ make_vsn(_, _) ->
-spec request(rebar_hex_repos:repo(), binary(), binary(), false | binary())
-> {ok, cached} | {ok, binary(), binary()} | error.
request(Config, Name, Version, ETag) ->
Config1 = Config#{http_etag => <<"\"", ETag/binary, "\"">>},
Config1 = Config#{http_etag => ETag},
try hex_repo:get_tarball(Config1, Name, Version) of
{ok, {200, #{<<"etag">> := ETag1}, Tarball}} ->
{ok, Tarball, rebar_utils:to_binary(rebar_string:trim(rebar_utils:to_list(ETag1), both, [$"]))};
{ok, Tarball, ETag1};
{ok, {304, _Headers, _}} ->
{ok, cached};
{ok, {Code, _Headers, _Body}} ->

Cargando…
Cancelar
Guardar