Project

Profile

Help

Issue #7054

Updated by mdellweg over 3 years ago

What it looks like: 

 ~~~ text 
 $ http get :24817/v2/foo/bar/manifests/1.0 
 HTTP/1.1 401 Unauthorized 
 Allow: GET, PUT, HEAD, OPTIONS 
 Connection: close 
 Content-Length: 6 
 Content-Type: */*; charset=utf-8 
 Date: Mon, 29 Jun 2020 06:29:04 GMT 
 Docker-Distribution-API-Version: registry/2.0 
 Server: gunicorn/20.0.4 
 WWW-Authenticate: Bearer realm="http://localhost:24816/token",service="localhost:24816",scope="repository:foo/bar:pull" 
 X-Frame-Options: SAMEORIGIN 

 detail 
 ~~~ 

 What it should look like (Content-Type header _is_ important): 

 ~~~ text 
 $ http put :24817/v2/               
 HTTP/1.1 401 Unauthorized 
 Allow: GET, HEAD, OPTIONS 
 Connection: close 
 Content-Length: 111 
 Content-Type: application/json 
 Date: Mon, 29 Jun 2020 06:30:34 GMT 
 Docker-Distribution-API-Version: registry/2.0 
 Server: gunicorn/20.0.4 
 Vary: Accept 
 WWW-Authenticate: Bearer realm="http://localhost:24816/token",service="localhost:24816" 
 X-Frame-Options: SAMEORIGIN 

 { 
     "errors: [{ 
         "code": "UNAUTHORIZED", 
         "message": "detail": "Access to the requested resource is not authorized. A Bearer token is missing in a request header.", 
         "detail": {} 
     }] header." 
 } 
 ~~~

Back