Quantcast
Channel: GitHub Classroom - GitHub Community
Viewing all articles
Browse latest Browse all 55

GitHub Classroom says 404 to HEAD request

$
0
0

Dear Forum,

Using a classical Java HTTP client library (Jersey), I get a 404 status sent back to me when sending a HEAD request to the URL https://classroom.github.com/a/mgecjMoT. The URL corresponds to an assignment that exists. A GET request returns the expected 200 status.

Using curl yields the expected 200 status, for both HEAD (-I) and GET requests.

Why does GitHub classroom return a 404 status in some cases for a HEAD request on a URL that exists? Could anyone investigate?

Here is the Java code, for the readers who would wonder.

Invocation.Builder request = ClientBuilder.newClient().target(“https://classroom.github.com/a/mgecjMoT”).request();
LOGGER.info(“Requesting.”);
LOGGER.info(“Using GET: {}.”, request.get());
LOGGER.info(“Using HEAD: {}.”, request.head());

And the result is as follows.

00:17:10.187 [main] INFO i.g.o.check_links_from_source.App - Requesting.
00:17:37.004 [main] INFO i.g.o.check_links_from_source.App - Using GET: InboundJaxrsResponse{context=ClientResponse{method=GET, uri=https://classroom.github.com/a/mgecjMoT, status=200, reason=OK}}.
00:17:48.815 [main] INFO i.g.o.check_links_from_source.App - Using HEAD: InboundJaxrsResponse{context=ClientResponse{method=HEAD, uri=https://classroom.github.com/a/mgecjMoT, status=404, reason=Not Found}}.

Same behavior when changing the user agent used by the client to “curl” or to “curl/7.55.1”.

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 55

Trending Articles


Grand galla med gull og glitter


Psykiater Tonny Westergaard


Jav Uncensored - Tokyo-Hot n1002 Miyu Kitagawa


Moriya Suwako (Touhou)


BRODERET KLOKKESTRENG MED ORDSPROG 14 X 135 CM.


Naruto Shippuden Episode 471 Subtitle Indonesia


Fin gl. teske i sølv - 2 tårnet - stemplet


Kaffefilterholder fra Knabstrup


Anders Agger i Herstedvester


Onkel Joakims Lykkemønt *3 stk* *** Perfekt Stand ***


Sælges: Coral Beta/Flat (Højttaler-enheder)


Starwars landspeeder 7110


NMB48 – Durian Shounen (Dance Version) [2015.07.15]


Le bonheur | question de l'autre


Scope.dk som agent?


Akemi Homura & Kaname Madoka (Puella Magi Madoka Magica)


Tidemands taffel-marmelade julen1934+julen 1937+julen 1938.


Re: KZUBR MIG/MMA 300 zamena tranzistora


Analyse 0 mundtlig eksamen


DIY - Hæklet bil og flyvemaskine