Skip to content

Commit

Permalink
fix(wifi): correct matching requests made from browsers
Browse files Browse the repository at this point in the history
Check:
  https://www.rfc-editor.org/rfc/rfc9110.html#section-3.9
for _Example Message Exchange_.
  • Loading branch information
pzygielo committed Mar 24, 2024
1 parent f9bb62a commit d90b22e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libraries/WiFi/examples/SimpleWiFiServer/SimpleWiFiServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ void loop(){
}

// Check to see if the client request was "GET /H" or "GET /L":
if (currentLine.endsWith("GET /H")) {
if (currentLine.startsWith("GET /H")) {
digitalWrite(5, HIGH); // GET /H turns the LED on
}
if (currentLine.endsWith("GET /L")) {
if (currentLine.startsWith("GET /L")) {
digitalWrite(5, LOW); // GET /L turns the LED off
}
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/WiFi/examples/WiFiAccessPoint/WiFiAccessPoint.ino
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ void loop() {
}

// Check to see if the client request was "GET /H" or "GET /L":
if (currentLine.endsWith("GET /H")) {
if (currentLine.startsWith("GET /H")) {
digitalWrite(LED_BUILTIN, HIGH); // GET /H turns the LED on
}
if (currentLine.endsWith("GET /L")) {
if (currentLine.startsWith("GET /L")) {
digitalWrite(LED_BUILTIN, LOW); // GET /L turns the LED off
}
}
Expand Down

0 comments on commit d90b22e

Please sign in to comment.