-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
curl -Z overlapping and truncated output on stdout #5175
Comments
|
I don't think there's necessarily any reason for it to be a given as tools such as (GNU) I imagined curl would make some effort to ensure the output from a request is collected together rather than interspersed with the output from other requests. This would be similar to |
I don't see how curl could do this in any effective or good way (I'm open to get proven wrong), but perhaps more important there's no such thing now and no promise of it. |
|
Collecting line-based output from several servers at once, maybe?
|
Sure, but that output can be mixed together. I guess it is a use case if that doesn't matter. |
This seems the most ideal. If output can be complete lines then that will make it usable in the unix shell environment. The order of output doesn't matter in my case, although if it did then curl would probably have to store everything until all requests are complete (e.g. |
That's a feature-request and not a bug. There might be use-cases where such a feature would come in handy, even if JSON seems to be a data format that is not line oriented and that would easily broke even in such a scenario. If someone wants to work on adding such a feature to curl I won't block it and I could assist, but I will personally not put it on my near-term TODO. |
I've been attempting to use
curl -sZ
with multiple urls as queries to twitch.tv which returns several lines of json such as:All of this is done before piping the whole lot through
jq
and filtering as needed. The trouble isjq
will randomly report errors such as:If I were to look at that particular column, for example, I can clearly see the output has been truncated or interwoven somehow, e.g.
I'm not sure how to prevent this, or provide a test case easily, but I couldn't find anything on google or the existing issues about potential output truncation or "weaving" when using
-Z
.Without
-Z
it works correctly, albeit much more slowly.The text was updated successfully, but these errors were encountered: