Commit 0c59a72
authored
Path extension takes precedence over Accept Header (#454)
We have many users some access the API through their web browsers. They
often wish to download a CSV file and use a link with a path extension
(.csv for example) in their web browser.
A web browser always sends its own Accept header, which includes at
least `application/xml`. Since this takes precedence, the user is
returned XML, instead of the CSV they wanted.
By changing the order of the ContentNegotiation strategies we make sure
the path extension takes precedence.1 parent 2b2905c commit 0c59a72
File tree
2 files changed
+5
-4
lines changed- klass-api/src
- main/java/no/ssb/klass/api/config
- test/java/no/ssb/klass/api/applicationtest
2 files changed
+5
-4
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
0 commit comments