Closed CarlosDerSeher closed 1 month ago
try https://github.com/espressif/esp-idf/issues/13459#issuecomment-2019815901 @CarlosDerSeher
I've changed toplevel CMakeLists to this
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
if(${IDF_TARGET} STREQUAL "linux")
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/"
"$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs")
set(COMPONENTS main)
endif()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_http_client_example)
idf_component_get_property(http_parser http_parser COMPONENT_LIB)
target_compile_definitions(${http_parser} PRIVATE "-DHTTP_PARSER_STRICT=0")
but the problem still persists.
@CarlosDerSeher
http_parser_parse_url() returns with sdead on the character and therefore http_client can't parse the url.
If your problem is indeed related to above parsing failure then DHTTP_PARSER_STRICT=0
should have helped here. You can try putting some debug prints under HTTP_PARSER_STRICT
in file components/http_parser/http_parser.c
to see that the build part is correct here.
If you still run into any issues then please share a minimal self sufficient application that we can use on our side to recreate the issue.
Ok I'll see if I find the time to investigate further. I switched to Arduino framework though and there I don't see this problem, so for me this is solved. Thanks for your time sir.
So, I am closing this issue now. Thanks.
Answers checklist.
IDF version.
v5.1.1
Espressif SoC revision.
esp32 v1.0
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
CMD
Development Kit.
Mini D1 ESP32
Power Supply used.
USB
What is the expected behavior?
Http client should be redirected to to relative url (record_list.php) passed by the server with 302 status code.
What is the actual behavior?
http_parser_parse_url()
returns withs_dead
on the character_
and therefore http_client can't parse the url.Steps to reproduce.
I have to say that I changed the
.host
entry below and alsopost_data
isn't original, as I can't share the server and login data here.Debug Logs.
More Information.
http_parser_parse_url()
function expects a schema when the location starts with a letter and therefore fails on the symbol_