NASA-AMMOS / NASA-AMMOS/AIT-GUI

Content-Type not set correctly for JSON responses

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
31
Forks
15
Avg merge
1m
Merged PRs (30d)
1

Description

When doing an HTTP request for an application route that generates a JSON response, the Content-Type comes back as "text/html" instead of "application/json".

To reproduce:

  1. Configure AIT-Core to start the AITGUIPlugin plugin.

  2. Start the AIT server.

  3. Retrieve the telemetry dictionary in JSON, dumping the response headers to headers.txt. Then examine the Content-Type header in that file.

      curl -D headers.txt 'http://localhost:8080/tlm/dict'
    

Expected result: Content-Type response header is "application/json"

Actual result: Content-Type response header is "text/html"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the AITGUIPlugin route described in the issue and inspect the handler for /tlm/dict. Use curl -D headers.txt to reproduce the response and compare its Content-Type with the expected application/json value. Done means the endpoint returns the correct header.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.