[Geoserver-devel] [JIRA] (GEOS-8349) Audit REST API won't return xml/json representation for request

Cezary Statkiewicz created an issue

GeoServer / BugGEOS-8349

Audit REST API won’t return xml/json representation for request

Issue Type:

BugBug

Assignee:

Unassigned

Components:

Monitoring, REST

Created:

17/Oct/17 11:15 AM

Environment:

GeoServer Version
origin/master
Git Revision
c968f4806fe30774408ceaf7cd47b0e08fc236cd
Build Date
2017-10-09T13:18:15Z
GeoTools Version
18-SNAPSHOT (rev 564b368745844fd79da271b5da68f1206fde1fef)
GeoWebCache Version
1.12-SNAPSHOT (rev 4202faf83d26c04a93f6743f16930d3ffb364f07/4202faf83d26c04a93f6743f16930d3ffb364f07)

Priority:

MediumMedium

Reporter:

Cezary Statkiewicz

When using Audit log endpoint /rest/monitor/* path, server will return only html representation:

$ curl -vv http://localhost:8080/geoserver/rest/monitor/requests/1.html
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /geoserver/rest/monitor/requests/1.html HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Tue, 17 Oct 2017 09:09:15 GMT
< Set-Cookie: JSESSIONID=node01f7eq6w2in071w4uxth17nqyf17.node0;Path=/geoserver
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Server: Jetty(9.4.7.v20170914)
< 
<html>
  <head>
    <style type="text/css">
      /*-----------------------
General styles
-----------------------*/
body {
background: #fff;
.. (and rest of html)..

However, if XML or JSON representation will be requested, HTTP 406 will be returned:

$ curl -vv http://localhost:8080/geoserver/rest/monitor/requests/1.xml
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /geoserver/rest/monitor/requests/1.xml HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 406 Not Acceptable
< Date: Tue, 17 Oct 2017 09:12:46 GMT
< Set-Cookie: JSESSIONID=node01tw9ways7yvh11kylb04jwxwid18.node0;Path=/geoserver
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Content-Length: 0
< Server: Jetty(9.4.7.v20170914)
< 
* Connection #0 to host localhost left intact

$ curl -vv http://localhost:8080/geoserver/rest/monitor/requests/1.json
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /geoserver/rest/monitor/requests/1.json HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> 
< HTTP/1.1 406 Not Acceptable
< Date: Tue, 17 Oct 2017 09:12:48 GMT
< Set-Cookie: JSESSIONID=node01mo2swwbhe8jw1mt4nufoysrzy19.node0;Path=/geoserver
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Content-Length: 0
< Server: Jetty(9.4.7.v20170914)
< 
* Connection #0 to host localhost left intact

Tested with build with recent master

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100066-sha1:1fd0815)

Atlassian logo