Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtered steal hangs on playground #3013

Closed
Razz4780 opened this issue Jan 13, 2025 · 1 comment
Closed

Filtered steal hangs on playground #3013

Razz4780 opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Razz4780
Copy link
Contributor

Bug Description

First request that matches the filter passes, second one hangs before it gets to the application

Steps to Reproduce

  1. Target ip-visit-counter using an X-PG-Tenant header filter and this app
from http.server import HTTPServer, BaseHTTPRequestHandler

class ChunkedHTTPHandler(BaseHTTPRequestHandler):
    protocol_version = "HTTP/1.1"

    def do_GET(self):
        # Send response headers
        self.send_response(200)
        self.send_header("Content-Type", "text/plain")
        self.send_header("Transfer-Encoding", "chunked")
        self.end_headers()

        # Send the response in chunks
        chunks = [
            "This is the first chunk.\n"*8000,
            "This is the second chunk.\n"
        ]
        for chunk in chunks:
            import time;
            time.sleep(3.0)
            # Write the chunk size in hexadecimal followed by the chunk data
            self.wfile.write(f"{len(chunk):X}\r\n".encode('utf-8'))
            self.wfile.write(chunk.encode('utf-8'))
            self.wfile.write(b"\r\n")

        # Signal the end of the response
        self.wfile.write(b"0\r\n\r\n")

if __name__ == "__main__":
    port = 80
    print(f"Starting server on port {port}")
    server = HTTPServer(("0.0.0.0", port), ChunkedHTTPHandler)
    server.serve_forever()
  1. Make two requests with curl
  2. First one should succeed, second one should fail

Backtrace

No response

mirrord layer logs

No response

mirrord intproxy logs

No response

mirrord agent logs

No response

mirrord config

No response

mirrord CLI version

3.128.0

mirrord-agent version

3.127.0

mirrord-operator version (if relevant)

3.101.0

plugin kind and version (if relevant)

No response

Your operating system and version

Ubuntu 24.04

Local process

/usr/bin/python3.12: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2

Local process version

No response

Additional Info

No response

@Razz4780 Razz4780 added the bug Something isn't working label Jan 13, 2025
Copy link

linear bot commented Jan 13, 2025

@Razz4780 Razz4780 self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant