netcat does not produce output when feeding via pipe
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcat-openbsd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: netcat
I am on the Maverick beta amd64, latest updates.
When I pipe content into netcat, it doesn't give me any output. Entering the commands manually works fine.
felix@felix-
Connection to ubuntu.com 80 port [tcp/www] succeeded!
felix@felix-
Connection to ubuntu.com 80 port [tcp/www] succeeded!
GET /
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://
<hr>
<address>
</body></html>
felix@felix-
affects: | netcat (Ubuntu) → netcat-openbsd (Ubuntu) |
This is a duplicate of bug 544935.
The short answer is to do:
echo "GET / HTTP/1.0\n\n" | nc -v ubuntu.com 80 -q -1