Comments (4)
Looks like this is similar to #16. Django's development server did not support chunked encoding (header transfer-encoding: chunked
and no content-length
header). ...But you mention Apache, which should be implementing the standards rather properly. So that's a bit surprising.
When we thought we fixed chunked encoding in #16, we missed the fact that setting content-type: 0
is not necessarily enough for empty request bodies. Turns out since Go 1.8, the ambiguity of default zero value or explicitly set zero of content-length on HTTP request needs to be handled with http.NoBody
or nil
if the remote does not support chunked encoding.
Luckily this is essentially a single line addition. 047cb5f
I released v0.9.2 after verifying content-length: 0
header for empty bodies in status pings.
Can you try and report back?
from runitor.
It works now!
1.2.3.4 - - [21/Nov/2021:12:08:01 +0000] "POST /ping//xxxx-xxx-xxxx-xxxx/start HTTP/1.1" 200 5767 "-" "runitor/v0.9.2 (+https://bdd.fi/x/runitor)"
1.2.3.4 - - [21/Nov/2021:12:08:01 +0000] "POST /ping//xxxx-xxx-xxxx-xxxx/0 HTTP/1.1" 200 1125 "-" "runitor/v0.9.2 (+https://bdd.fi/x/runitor)"
I can see both requests in my hc instance with a script that has no output.
My setup is Apache/2.4.29 + mod_wsgi 4.9
Awesome, thank you!
from runitor.
I can't reproduce this with the healthchecks.io instance.
(Although not relevant to this, that PingStatus logging should not be in the output. It's just noise but I clearly made a git add -p
mistake 🤦. Will publish 0.9.1 later today Fixed in 0.9.1.)
~% cat noout.sh
#!/usr/bin/env bash
foo() {
bar=$(ls /)
}
foo
~% runitor -- ./noout.sh
2021/11/20 07:45:45 PingStatus(handle=<redacted> exitCode=0, body)
Can you verify from the HTTP server logs of your own instance, that in fact runitor does not make an HTTP request?
As explained in the release notes of v0.9.0, exit status is now always delivered. This commit slightly changed the URI paths hit by runitor.
v0.8.0:
start: <instance-url>/<uuid>/start
exit code == 0: <instance url>/<uuid>
exit code != 0: <instance_url>/<uuid>/fail
v0.9.0:
start: <instance-url>/<uuid>/start
exit: <instance_url>/<uuid>/<exit-code>
If the exit code == 0, Healthchecks interprets it as a successful run.
This feature was added to Healthchecks in v.1.18.0 (rel Oct 2020), with this commit.
Is your local instance version older or newer than 1.18.0?
from runitor.
My HC Version: v1.24.1
In both cases I can see requests in my apache log, here is the log entry with a script that has no output:
1.2.3.4 - - [20/Nov/2021:23:00:01 +0000] "POST /ping//xxxx-xxx-xxxx-xxxx/start HTTP/1.1" 200 5767 "-" "runitor/v0.9.0 (+https://bdd.fi/x/runitor)"
1.2.3.4 - - [20/Nov/2021:23:00:01 +0000] "POST /ping//xxxx-xxx-xxxx-xxxx/0 HTTP/1.1" 411 1090 "-" "runitor/v0.9.0 (+https://bdd.fi/x/runitor)"
and when it has output:
1.2.3.4 - - [20/Nov/2021:23:12:01 +0000] "POST /ping//xxxx-xxx-xxxx-xxxx/start HTTP/1.1" 200 5767 "-" "runitor/v0.9.0 (+https://bdd.fi/x/runitor)"
1.2.3.4 - - [20/Nov/2021:23:12:01 +0000] "POST /ping//xxxx-xxx-xxxx-xxxx/0 HTTP/1.1" 200 1125 "-" "runitor/v0.9.0 (+https://bdd.fi/x/runitor)"
The status code differs. 411 means "server refuses to accept the request without a defined Content-Length header", do you have an idea what could cause this?
from runitor.
Related Issues (20)
- Feature request: `-create` flag HOT 2
- Show compiled URL on error HOT 1
- What happened to the v1.2.0 tag in Docker Hub? HOT 2
- Windows Schedule Powershell Task
- docker pull fails with docker rootless HOT 3
- Windows: Trojan Detected HOT 3
- Feature Request: Custom Header Support HOT 4
- Feature Request: Remove version from binary filenames HOT 1
- Update default value for -ping-body-limit HOT 2
- error: the input device is not a TTY HOT 2
- Feature request: Send command used on start HOT 2
- Feature request: Ignore HOT 1
- `panic: runtime error: invalid memory address or nil pointer dereference` on invalid slugs HOT 2
- Feature request: Upload logs to S3 HOT 7
- Ping body limit? HOT 1
- Feature request: add "log" endpoint HOT 13
- Add handling for HTTP 429 responses HOT 2
- Regression: API URL handling changed with release 1.1.0 HOT 9
- 307/308 redirects aren't handled well HOT 8
- Feature request: Update flag HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runitor.