[NETCONF-742] RFC8040 compliance: The RESTCONF server MUST support the HEAD method Created: 02/Nov/20  Updated: 15/Dec/21  Resolved: 15/Dec/21

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: Aluminium
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Valentin Mayamsin Assignee: Ivan Martiniak
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • ODL aluminum
  • feature:install odl-restconf-nb-rfc8040
  • feature:install odl-toaster


 Description   

https://tools.ietf.org/html/rfc8040#section-4.2
The RESTCONF server MUST support the HEAD method. The HEAD method is
sent by the client to retrieve just the header fields (which contain
the metadata for a resource) that would be returned for the
comparable GET method, without the response message-body.
The current behavior is not consistent with the spec

> curl -u admin:admin -I http://localhost:8181/rests/data/toaster:toaster
< HTTP/1.1 200 OK
< Set-Cookie: JSESSIONID=node0tp7ksek0vyu11fvjctgrgqwlw67.node0; Path=/; HttpOnly
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 01-Nov-2020 22:09:23 GMT
< ETag: "2009-11-20-toaster"
< Last-Modified: 2020-Nov-02 22:09:23
< Content-Type: application/yang-data+json
< Content-Length: 126

 



 Comments   
Comment by Tomas Cere [ 08/Feb/21 ]

HEAD request returns:

 

curl -u admin:admin -I http://localhost:8181/rests/data/network-topology:network-topology/topology=topology-netconf?content=config
HTTP/1.1 200 OK
{{ Set-Cookie: JSESSIONID=node01aduo9i6zx1641q60ufn6jlkys2.node0; Path=/; HttpOnly}}
{{ Expires: Thu, 01 Jan 1970 00:00:00 GMT}}
{{ Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 07-Feb-2021 13:10:21 GMT}}
{{ ETag: "2013-10-21-topology"}}
{{ Last-Modified: 2021-Feb-08 13:10:21}}
{{ Content-Type: application/yang-data+json}}
{{ Content-Length: 66}}

 

 

GET:

curl -vs -u admin:admin -X GET http://localhost:8181/rests/data/network-topology:network-topology/topology=topology-netconf?content=config
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8181 (#0)
* Server auth using Basic with user 'admin'
> GET /rests/data/network-topology:network-topology/topology=topology-netconf?content=config HTTP/1.1
> Host: localhost:8181
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.58.0
> Accept: /
{{> }}
< HTTP/1.1 200 OK
< Set-Cookie: JSESSIONID=node0yatas9qklkwk16lkwys94zpo43.node0; Path=/; HttpOnly
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 07-Feb-2021 13:10:31 GMT
< ETag: "2013-10-21-topology"
< Last-Modified: 2021-Feb-08 13:10:31
< Content-Type: application/yang-data+json
< Content-Length: 66
{{< }}
* Connection #0 to host localhost left intact
{{

{"network-topology:topology":[\{"topology-id":"topology-netconf"}

]}}}

 

 

I'm having trouble figuring out whats not consistent with the spec, can you point out the issues we have here, if there are still any present?

 

Comment by Ivan Martiniak [ 15/Dec/21 ]

Hello hjslgfsd7, Can you please refer further details about issue, as tcere mentioned earlier?

Comment by Valentin Mayamsin [ 15/Dec/21 ]

Bug appears to be invalid. Let's close it

Comment by Ivan Martiniak [ 15/Dec/21 ]

Ok, thanks for your response.

Generated at Wed Feb 07 20:15:47 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.