File tree 2 files changed +2
-5
lines changed
2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ This project is an example of an HTTP server designed to facilitate the transfer
5
5
### Example cURL Command
6
6
7
7
``` bash
8
- curl -X PUT -H " Content-Type: application/octet-stream " - T ./my-file.mp3 http://esp-ip/upload/my-file.mp3
8
+ curl -X PUT -T ./my-file.mp3 http://esp-ip/upload/my-file.mp3
9
9
```
10
10
11
11
## Resources
Original file line number Diff line number Diff line change @@ -136,7 +136,6 @@ bool WebServer::_parseRequest(WiFiClient& client) {
136
136
String headerName;
137
137
String headerValue;
138
138
bool isForm = false ;
139
- bool isRaw = false ;
140
139
bool isEncoded = false ;
141
140
// parse headers
142
141
while (1 ){
@@ -159,8 +158,6 @@ bool WebServer::_parseRequest(WiFiClient& client) {
159
158
using namespace mime ;
160
159
if (headerValue.startsWith (FPSTR (mimeTable[txt].mimeType ))){
161
160
isForm = false ;
162
- } else if (headerValue.startsWith (FPSTR (mimeTable[none].mimeType ))){
163
- isRaw = true ;
164
161
} else if (headerValue.startsWith (F (" application/x-www-form-urlencoded" ))){
165
162
isForm = false ;
166
163
isEncoded = true ;
@@ -176,7 +173,7 @@ bool WebServer::_parseRequest(WiFiClient& client) {
176
173
}
177
174
}
178
175
179
- if (isRaw && _currentHandler && _currentHandler->canRaw (_currentUri)){
176
+ if (!isForm && _currentHandler && _currentHandler->canRaw (_currentUri)){
180
177
log_v (" Parse raw" );
181
178
_currentRaw.reset (new HTTPRaw ());
182
179
_currentRaw->status = RAW_START;
You can’t perform that action at this time.
0 commit comments