Skip to content

Commit

Permalink
removing mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Oct 1, 2018
1 parent 9b1a4d7 commit e893b3e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions library.bash
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,10 @@ function add_object () {
http_code=$(sed '$!d' <<<"$response")

if [ "$http_code" -eq 201 ] || [ "$http_code" -eq 202 ]; then
headers=$(sed -n '1,/^\r$/p' <<<"$response")


# get the real Location
location=$(grep -oP 'Location: \K.*' <<<"$headers")
oid=$(sed 's/.*\///' <<<"$location")
location=$(grep -oP "Location: \K.*" <<<"$response")
oid=$(sed 's/.*\///' <<<"$location")

echo "Oid created object: $oid"
return 0
Expand Down

0 comments on commit e893b3e

Please sign in to comment.