XX-net/XX-Net · warning

direct %s %s % status:%d

Error message

direct %s %s % status:%d

What it means

direct_handler got an implausible HTTP status > 600 from a direct (non-proxied) request — not a real HTTP status, indicating a malformed/parsed-wrong response. It logs method/host/path/status and retries (continue).

Source

Thrown at code/default/gae_proxy/local/direct_handler.py:44

def handler(method, host, path, headers, body, wfile, timeout=60):
    time_request = time.time()

    if b"Connection" in headers and headers[b"Connection"] == b"close":
        del headers[b"Connection"]

    errors = []
    while True:
        time_left = time_request + timeout - time.time()
        if time_left <= 0:
            return_fail_message(wfile)
            return "ok"

        try:
            response = direct_front.request(method, host, path, headers, body, timeout=time_left)
            if response:
                if response.status > 600:
                    xlog.warn("direct %s %s % status:%d", method, host, path, response.status)
                    continue
                elif response.status > 400:
                    server_type = response.headers.get(b'Server', b"")

                    if b"G" not in server_type and b"g" not in server_type and server_type not in google_server_types:

                        xlog.debug("IP:%s host:%s not support GAE, server type:%s status:%d",
                                  response.ssl_sock.ip_str, host, server_type, response.status)
                        #direct_front.ip_manager.report_connect_fail(response.ssl_sock.ip_str, force_remove=True)
                        response.worker.close()
                        continue
                break
        except OpenSSL.SSL.SysCallError as e:
            errors.append(e)
            xlog.warn("direct_handler.handler err:%r %s/%s", e, host, path)
        except Exception as e:
            errors.append(e)
            xlog.exception('direct_handler.handler %r %s %s , retry...', e, host, path)

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Retry usually resolves transient corruption — the loop continues automatically
  2. If persistent for one host, bypass/exclude that host or force it through the proxy
  3. Update XX-Net for HTTP parser fixes
  4. Check for middlebox/antivirus TLS interception on the path
Defensive patterns

Strategy: retry

Prevention

When it happens

Trigger: direct_front.request returning a response whose status field exceeds 600: corrupted response, non-HTTP server answering, H2 parser bug, or injected garbage from middleboxes.

Common situations: DPI injecting fake responses, connecting to a host that speaks a non-HTTP protocol on 443/80, or parser bugs on chunked/HTTP2 responses.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/bae0d9b571a0b8f1. Report an issue: GitHub.