net.http: add a temporary fix for the intermittent segfault with http.get_ text/1 and -prod -cc gcc 13.2.0 (fix #20506) (#20660)

This commit is contained in:
GGRei 2024-01-26 10:33:09 +01:00 committed by GitHub
parent 8714233f79
commit 2c6a8c536c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -143,7 +143,9 @@ pub fn delete(url string) !Response {
return fetch(method: .delete, url: url)
}
// TODO - @[noinline] attribut is used for temporary fix the 'get_text()' intermittent segfault / nil value when compiling with GCC 13.2.x and -prod option ( Issue #20506 )
// fetch sends an HTTP request to the `url` with the given method and configuration.
@[noinline]
pub fn fetch(config FetchConfig) !Response {
if config.url == '' {
return error('http.fetch: empty url')