Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location Header in /system/inputs REST response contains wrong value ('') #1020

dfch opened this issue Mar 3, 2015 · 5 comments


Copy link

@dfch dfch commented Mar 3, 2015

When issuing a POST /system/inputs to create a new input the server responds with HTTP 201 and a Location header. However the value of this header field does not contain the correct IP address of the actual location, but instead returns an address: This is in violation of RFC 2616 14.30 Location which states that the Location header is to refer to the actual location of the resource that was created in response to the request.

This behaviour was observed on a Graylog v1.0.0 inside the graylog2/allinone docker image on a CentOS 7.

Example Request

User-Agent: Mozilla/5.0 (Windows NT; Windows NT 6.1; de-CH) WindowsPowerShell/3.0
Content-Type: application/json
Authorization: Basic U2Nobml0dGVuZml0dGljaDpSb2NrWnp6
Content-Length: 553

    "configuration":  {
      "tls_key_password":  "P@ssw0rd",
      "recv_buffer_size":  1048576,
      "max_message_size":  2097152,
      "bind_address":  "",
      "port":  12201,
      "tls_enable":  false,
      "use_null_delimiter":  true
    "title":  "myNewGlobalGelfTcpInput",
    "global":  true,
    "type":  "org.graylog2.inputs.gelf.tcp.GELFTCPInput"

Example Response

HTTP/1.1 201 Created
Content-Type: application/json
X-Runtime-Microseconds: 25602
Content-Length: 33

Copy link

@kroepke kroepke commented Mar 3, 2015

Investigate which host jersey's UriBuilder takes if none is specified.

@kroepke kroepke added the bug label Mar 3, 2015
@kroepke kroepke added this to the 1.0.1 milestone Mar 3, 2015
@dennisoelkers dennisoelkers self-assigned this Mar 4, 2015
Copy link

@dennisoelkers dennisoelkers commented Mar 4, 2015

Thanks for reporting this. Can you please post the rest_listen_uri and rest_transport_uri (if defined) settings from your server's configuration file?

Copy link

@dfch dfch commented Mar 4, 2015

Hi Dennis, good hint! here are the values:

rest_listen_uri =
#rest_transport_uri =

However, I am using your official plain Docker image without any modification. So this is wrong out of the box. In my opinion this would have to be adjusted by the graylog-ctl reconfigure-* script.

Copy link

@bernd bernd commented Mar 4, 2015

Setting rest_listen_uri to is supported but the REST API should not generate Location headers with

Copy link

@dennisoelkers dennisoelkers commented Mar 4, 2015

Yeah, this is totally fine, but explains where the value in the location header is coming from. Will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants