Stored cached responses ignore non 200 status codes
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start by tracing how the cache stores a response and restores it on a cache hit; the issue does not name implementation files or tests. Check where the original status code is preserved and compare the first response with the cached response in the reproducer. Done means cached 203 and 206 responses retain their status codes; add or update a regression test for a cached 206 response.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version
5.x and 4.x
Context
Stored response upon HIT always override status code to 200. That is a problem for other successful cached responses (e.g. 203 and 206).
Steps to reproduce
JBang reproducer:
///usr/bin/env jbang "$0" "$@"
//DEPS io.vertx:vertx-core:5.2.0
//DEPS io.vertx:vertx-http-proxy:5.2.0
//DEPS io.vertx:vertx-web-client:5.2.0
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpHeaders;
import io.vertx.ext.web.client.WebClient;
import io.vertx.httpproxy.HttpProxy;
import io.vertx.httpproxy.ProxyOptions;
import io.vertx.httpproxy.cache.CacheOptions;
public class cache_206_bug {
public static void main(String[] args) throws Exception {
Vertx vertx = Vertx.vertx();
vertx.createHttpServer()
.requestHandler(req -> req.response()
.setStatusCode(206)
.putHeader(HttpHeaders.CACHE_CONTROL, "public, max-age=3600")
.putHeader(HttpHeaders.CONTENT_RANGE, "bytes 0-99/1000")
.putHeader(HttpHeaders.CONTENT_TYPE, "video/mp4")
.end("partial content"))
.listen(8081)
.await();
HttpProxy proxy = HttpProxy.reverseProxy(
new ProxyOptions().setCacheOptions(new CacheOptions()),
vertx.createHttpClient()).origin(8081, "localhost");
vertx.createHttpServer()
.requestHandler(proxy)
.listen(8080)
.await();
WebClient client = WebClient.create(vertx);
var resp1 = client.get(8080, "localhost", "/video").send().await();
System.out.println("Request 1 Status: " + resp1.statusCode()); // returns 206
Thread.sleep(1000);
var resp2 = client.get(8080, "localhost", "/video").send().await();
System.out.println("Request 2 Status: " + resp2.statusCode()); // returns 200, should be 206
vertx.close().await();
}
}
Do you have a reproducer?
No response
- Lenguaje dominante
- Java
- Estrellas
- 68
- Forks
- 39
- Merge medio
- 2 d 43 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 eclipse-vertx/vertx-http-proxy
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
-
ExceptionHandler for send requests and proxy responses in `HttpProxy`/`ReverseProxy`Quizá libre de nuevo @tsegismont la tomó hace 574 días y no hay ningún pull request abierto. Abiertoenhancement
eclipse-vertx/vertx-http-proxy#114 · 2 comentarios · 1 asignado ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
eclipse-vertx/vertx-http-proxy#109 · 5 comentarios ·
-
Silent failure to send backend request after authentication with OAuth2Quizá libre de nuevo @tsegismont la tomó hace 725 días y no hay ningún pull request abierto. Abiertobug
eclipse-vertx/vertx-http-proxy#101 · 5 comentarios · 1 asignado ·
Todos los issues de eclipse-vertx/vertx-http-proxy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#7302 ·
Los mantenedores suelen responder en 3 días
-
area: android good first issue help wanted testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Gautam-aman/ResQNet#56 ·
Los mantenedores suelen responder en 1 día
-
documentation hermes-queue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
chrisalunlloyd2-sudo/mindpalace#294 ·
Los mantenedores suelen responder en 1 día
-
better night vision compatAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QuicksilverMC/Argentum#31 ·