Project

General

Profile

Actions

Bug #14852

closed

rest_v3.rb does not send headers when 'data' field in request is nil

Added by Chris Duryee almost 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman modules
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When katello_devel attempts to register a smartproxy, it fails with a 401 error. This appears to be related to headers not being passed through correctly with rest_v3.rb. For example:


    BAD (will 401)

    +19868:5720c0b3:0
    GET /api/v2/smart_proxies?search=name=%2522centos7-devel.example.com%2522 HTTP/1.1
    Accept:*/*
    Accept-Encoding:gzip;q=1.0,deflate;q=0.6,identity;q=0.3
    Authorization:OAuth oauth_consumer_key="4GmWaooj3SYjgkmNirYHXGoCJZg29NTp", oauth_nonce="qT59KRHXhnmgmg6I12komyYRLoc7Eg1zLfrCCB91Iw", oauth_signature="x98qYZAey5XKX1u2L%252F3n2ax8Gzw%253D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1461764275", oauth_version="1.0" 
    Connection:close
    Host:centos7-devel.example.com
    User-Agent:OAuth gem v0.4.7

    GOOD (will 200)

    +19866:5720c25f:0
    GET /api/smart_proxies?search=name%253D%2522centos7-devel.example.com%2522 HTTP/1.1
    Accept:application/json;version=2
    Accept-Encoding:gzip, deflate
    Authorization:OAuth oauth_consumer_key="4GmWaooj3SYjgkmNirYHXGoCJZg29NTp", oauth_nonce="xqaFrMxiKulruEeZ8z3IwoS9GQL5bEHEZ3tEsvXJk", oauth_signature="IL%252BrARQbnqe%252BGgMWSnK2vwpLBFg%253D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1461764703", oauth_version="1.0" 
    Content-Type:application/json
    Foreman-User:admin
    Host:centos7-devel.example.com
    User-Agent:OAuth gem v0.4.7

Actions #1

Updated by Chris Duryee almost 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #2

Updated by Dominic Cleal almost 8 years ago

  • translation missing: en.field_release set to 136
Actions

Also available in: Atom PDF