fetchRemote overwrites responseInfo table with status code on fail
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
Start by locating the new fetchRemote implementation and its callback handling; the issue does not name source files or tests. Reproduce a failed request where the remote end returns an error, then inspect the callback arguments against the documented responseInfo table contract. Done when failures pass a table with the documented fields and the callback no longer errors when reading success.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When new implementation of fetchRemote fails due to network stack and the callback function is called, the responseInfo table is overwritten with the network status code.
function fetchRemoteCallback(responseData, tblResponseInfo, ...)
-- on fail, lua will report: attempt to index local tblResponseInfo (a number value)
-- if the response is OK, it will be a table with success attribute set to true
if(not tblResponseInfo.success) then
error("fetchRemote failed");
end
end
According to the wiki, it should always return a table and youre supposed to use success and statusCode attributes for error handling:
callbackFunction: This is the function that should receive the data returned from the remote server. The callback argument list should be:
responseData - A string containing the remote response
responseInfo - A table containing:
success - A boolean indicating if the request was successful.
statusCode - An integer status/error code. See the list of possible error values below.
headers - A table containing the HTTP response headers
arguments... - The arguments that were passed into fetchRemote
Steps to reproduce
Use the new fetchRemote implementation and request data where remote end actively sends an error back
Version
No response
Additional context
No response
Relevant log output
Security Policy
- I have read and understood the Security Policy and this issue is not security related.
- Lenguaje dominante
- C++
- Estrellas
- 1.9k
- Forks
- 588
- Merge medio
- 4 d 9 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de multitheftauto/mtasa-blue
-
engineSetModelFlag, engineGetModelFlag, engineSetModelFlags and engineResetModelFlag return errorAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
multitheftauto/mtasa-blue#3186 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
bindKey shouldn't be able to bind function multiple timesPosiblemente ocupada @iManGaaX la tomó hace 10 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
multitheftauto/mtasa-blue#2629 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
Crash every time disconnectingAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
multitheftauto/mtasa-blue#5550 · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
multitheftauto/mtasa-blue#5549 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
multitheftauto/mtasa-blue#5547 · 4 comentarios · 1 reacción ·
Los mantenedores suelen responder en 3 días
Todos los issues de multitheftauto/mtasa-blue
Issues similares
-
mlir
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
llvm/llvm-project#241070 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
backlog documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 96/100
EchoTools/nevr-runtime#2354 ·
Los mantenedores suelen responder en 1 día
-
Page request: clang-replAbiertohelp wanted new command
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tldr-pages/tldr#25111 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Ask the `ServerHelper` for fresh headers on every poll in `Future::get`, as is done for cookiesAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
NVIDIA/cuda-quantum#5886 ·
Los mantenedores suelen responder en 1 día