Can't use netcat as simple HTTP client

Bug #599864 reported by Alexey Sveshnikov on 2010-06-29
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netcat (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: netcat

Hello

  echo -e "GET /robots.txt HTTP/1.1\nHost: launchpad.net\nConnection: close\n" | nc -vv launchpad.net 80

This simple command doesn't works with the netcat version that ships with ubuntu by default (netcat-openbsd). It's the most common use case of netcat for me. It works only after changing netcat to netcat-traditional.

My system is:
Description: Ubuntu 10.04 LTS
Release: 10.04

packages:
ii netcat-openbsd 1.89-3ubuntu2 TCP/IP swiss army knife
ii netcat-traditional 1.10-38 TCP/IP swiss army knife

vlad (devvlad) wrote :

try
(echo -e "GET /robots.txt HTTP/1.1\r\nHost: launchpad.net\r\nConnection: close\r\n\r\n"; sleep 5) | nc -vvvvC launchpad.net 80

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers