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

TaskQueue HTTP call fails due to missing "Host" header #250

Open
kerbymart opened this issue Apr 4, 2024 · 1 comment
Open

TaskQueue HTTP call fails due to missing "Host" header #250

kerbymart opened this issue Apr 4, 2024 · 1 comment

Comments

@kerbymart
Copy link

Description

When attempting to make an HTTP call using the TaskQueue API, the operation fails on CapeDwarf due to a missing mandatory "Host" HTTP header. This issue does not occur on Google App Engine (GAE) SDK, indicating a specific problem with CapeDwarf's handling of HTTP headers in TaskQueue operations.

Error Message

Couldn't find the mandatory "Host" HTTP header.

This is followed by a NullPointerException in ServletCall.java:370.

Code Snippet

The error occurs when executing a basic TaskQueue operation:

Queue queue = QueueFactory.getQueue(milkID + "-queue");
String taskUrl = "/milks/" + milkID;
queue.add(TaskOptions.Builder.withUrl(taskUrl).param("param1", param1));

Workaround Attempt

A workaround involving an HTTP filter to manually set the "Host" header was attempted, but it led to further runtime errors and instability within the CapeDwarf environment.

Environment

  • CapeDwarf version: 2.0.0.Final

Expected Behavior

TaskQueue operations should include all mandatory HTTP headers, including "Host", without requiring manual intervention or workarounds.

Actual Behavior

The "Host" header is missing in TaskQueue operations, leading to failed HTTP requests and errors in the application log.

Steps to Reproduce

  1. Set up a basic TaskQueue operation as shown in the code snippet.
  2. Deploy the application to CapeDwarf.
  3. Observe the error in the application logs after the TaskQueue operation is executed.

Additional Context

This issue does not occur on other platforms like GAE Legacy Cloud Runtime or AppScale, suggesting a problem with CapeDwarf's TaskQueue implementation.

@kerbymart
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant