Commit a97b0d4
committed
fix: Default basePath to / when server URL has no path
URI.create("http://127.0.0.1:4444").getPath() returns an empty
string, not null, so the previous Optional.ofNullable fallback
left basePath empty and HttpServer.createContext rejected it.1 parent ffb8af1 commit a97b0d4
2 files changed
Lines changed: 14 additions & 1 deletion
File tree
- src
- main/java/com/retailsvc/http/spec
- test/java/com/retailsvc/http/spec
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| |||
0 commit comments