Programming :: How To Listen To HTTP Request Using C++/C ?

Sep 14, 2009

Dear all,

My application has to listen to http request and it must be able to read the http header and then forward the request from proxy. All these things must be done on C/C++. please help me. Awaiting for your reply.

Thank in advance

View 4 Replies


ADVERTISEMENT

Programming :: Send A Request To A Http Server Without Using Sockets.

Jul 8, 2011

Hi, is it possible to send a request to a http server without using sockets?

View 7 Replies View Related

Server :: Redirect All Client Http Request To Https Request In Squid?

Jun 25, 2010

how to redirect all client http request to https request in squid

View 1 Replies View Related

Networking :: Craft A Valid Http/1.1 Request For Getting Http Headers (not The Html File Itself)

Sep 27, 2010

Using netcat, nc(1), craft a valid http/1.1 request for getting http headers (not the html file itself!) for the main index page of www dot aalto dot fi. What request method did you use? Which headers did you need to send to the server? What was the status code for the request? Which headers did the server return? Explain the purpose of each header.

nc -v www dot aalto dot fi 8080
HEAD / HTML/1.1
host: www dot aalto dot fi
And it returns:
200 OK
Content-Length: 858
Content-Type: text/html
Last-Modified: Thu, 02 Sep 2010 12:46:01 GMT
[Code]....

I really don't know what does it mean. Question 2: Using netcat, nc(1), start a bogus web server listening on the loopback interface port 8080. Verify with netstat(, that the server really is listening where it should be. Direct your browser to the bogus server and capture the User-Agent: header "Direct your browser to the bogus server and capture the User-Agent: header" I don't understand this question.

View 2 Replies View Related

Ubuntu Servers :: Make Server Listen At Different Port For HTTP?

Apr 6, 2010

How can I set my server to listen at a different port for http access. I would like to use port 8080 (to circumnavigate isp blocks). Also can I do the same thing for sftp connections?

View 3 Replies View Related

Software :: Is There API Can Use To Do Http Request.

May 21, 2010

Is there an linux API I can use to do a http request?Say I want to display URL...throught the API

View 1 Replies View Related

Server :: How Many Http Request Are Sent And Received

Aug 20, 2010

are there any linux command to have how many http request are sent and received??

View 4 Replies View Related

Server :: Relaying HTTP Request Sent Fro Outside The LAN?

Apr 27, 2010

I can ssh to my server which is on a LAN accessing the'Net through a Linksys modem/router.I want to be able to configure the Router by using the it's web interface, but the server only has a Command Line Interface and I can only run text browsers like Lynx,hich, although I can log onto the router, the Javascript routines mean that I can't configure the router.I can't access the router's web interface from the 'Net because the router is set up to pass any requests on port 80 to the server.Is there any way I can communicate with the router by sending HTTP requests from my browser external to the LANhaving these relayed to the router by the server and then the server relaying the responses back to my browser.

View 2 Replies View Related

Networking :: How To Redirect Http Request In Squid ?

Jan 10, 2011

Hi,
In squid i have blocked some sites like facebook and ......I want to know is there any way when user type in his browser like www.facebook.com instead it show something like following it automatically redirect to www.google.com

Error
The requested URL could not be retrieved
The following error was encountered:
Access Denied.

Basically I want to redirect the http request so the user should not see the page not found error but www.google.com page may open automatically.

thanks
garden

View 2 Replies View Related

Networking :: Http Request Forwarding To Proxy

Feb 26, 2009

hi

i want to redirect the packet to proxy server. can u help me.

Present network.

MY internal network ==> switch ==> proxyserver ==> router ==> internet.
(for internet i use
to connect proxy, in web browser==> lan settings ==> proxy server ip address )

What i want is

My internal network ==> getway or firewall ==> switch ==> proxy server ==> router==> internet. ( where this getway or firewall i can configure for forward http request to proxy server.)


so that i can separate my internal network from intranet but able to access the internet.


help me out

raghu

View 2 Replies View Related

Ubuntu :: Vmware Server - Could Not Complete A Request - HTTP 0

May 16, 2010

Cannot get vmware server to work properly running on ubuntu server 9.04

Trying to access the web interface have to highlight the url and keep hitting enter several times to get to the login and after logging in it is real slow and nothing works cannot create virtual machines

I added vmware server to an existing LAMP server

View 4 Replies View Related

Ubuntu Security :: Ettercap Can See Http Request But Not Response

Nov 8, 2010

ettercap can see http request but not response

I'm trying to see regular http responses from my wireless ipad (victim) from my wired pc (attacker). Everything's working great but I can only see the http requests not the responses.

I've done much reading and googling and tried registering in more relevant forums but some forums were shutdown, so I've come here.

Code:
# setup ip forwarding
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
# use ettercap to do the mitm using only mitm
sudo ettercap --iface eth0 --text --plugin autoadd --only-mitm --mitm arp:remote /192.168.0.1/ /192.168.0.155/

[Code]....

View 2 Replies View Related

Networking :: Retrieve HTTP Request From A Particular Port Using Libcurl

Feb 18, 2011

I have to retrieve a http request from a particular port using libcurl. I'm using localhost .I am done with retrieving http request using socket programming. how to start integration of libcurl in simple socket programming code.

View 1 Replies View Related

CentOS 5 Networking :: Forwarding HTTP Request To A Internal Server?

Aug 11, 2011

i am forwarding HTTP request to a internal server, it is quiet successful but access logs donot show the ip of the external m/c. Rather it shows the ip of the machine on which i have enabled port forwarding.

View 2 Replies View Related

Networking :: Segmentation Fault In Receiving Http Request From Client Code?

Feb 17, 2011

There is a segmentation fault error while receiving http request side program. Following is the code:

Code:
#include<iostream>
#include <sys/types.h>

[code]...

View 1 Replies View Related

Fedora :: Cannot Test Proxies, Or Remote File Availability Without Both HTTP::Request:ommon And LWP::UserAgent

Mar 30, 2010

I am trying to istall litb for P2020DS. I got an error the following error:

[hwtesting@HWLSRV1 ~]$ cd /home/hwtesting/ltib-p2020ds-20091119
[hwtesting@HWLSRV1 ltib-p2020ds-20091119]$ ./ltib
Don't have HTTP::Request:ommon
Don't have LWP::UserAgent
Cannot test proxies, or remote file availability without both
HTTP::Request:ommon and LWP::UserAgent

add folowwing line to User Privilage section:

hwtesting ALL = NOPASSWD: /bin/rpm, /opt/freescale/ltib/usr/bin/rpmvisudo

I edit the sudoers by visudo command and insert this line just under the following line:

root ALL = (ALL) All

But still I am getting the following:

Don't have HTTP::Request:ommon
Don't have LWP::UserAgent
Cannot test proxies, or remote file availability without both
HTTP::Request:ommon and LWP::UserAgent

View 4 Replies View Related

OpenSUSE Network :: Weirdness With WordPress On Localhost - An Unexpected HTTP Error Occurred During The API Request

Nov 25, 2010

I installed WordPress 3.x on my localhost/Apache server, but I can neither install plugins nor update anything.This happens with both the stable WP3.0 version and the 3.1 beta. When I try to search the Plugin Directory from the WP dashboard, I get this message: An Unexpected HTTP Error occurred during the API request.When I run an update, I get a page asking for the login credentials for the ftp user ("To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host."). Since I'm part of the 'ftp' group on the system, I enter my system login information, click Proceed -- and get a blank page that does nothing.

I've gone to YaST, and I see that the system ftp user has a 6-character password (which may or may not be mine). I'm afraid to change it and risk screwing up other ftp-related functions. I'm running openSUSE 11.3, and am obsessive about updating. I will note that I have an old 2WIRE router that often requires me (including Zypper repos) to enter IP addresses instead of DNS-based URLs to successfully download stuff. Not sure if this is related, but just in case...

View 1 Replies View Related

General :: LAN Machines Sending Packets By Iftop - Set Only Send And Recieve Http - Smtp - Ssh - Dns - Dhcp Request?

Jun 10, 2011

I have proxy running. I have seen LAN machines sending packets by iftop -P -F 192.168.10./24

[Code]....

How do i set my iptables so that I can only send and recieve http,smtp,ssh,dns,dhcp request in and out of the proxy

[Code]...

View 3 Replies View Related

Server :: Apache Response "HTTP Request Sent; Waiting For Response" Too Long

Jul 19, 2011

when I try to access any page even small html pages it stays like 3 seconds in HTTP request sent; waiting for response. state..even when I use Lynx locally on the server..bypassing any possible network issues..logs dont show a thing..the server itself is a high end server with nothing running on it apart from apache which is not serving anny clients now, firewall is disabled and hostnamelookups are set to OFF.

View 1 Replies View Related

Programming :: Application To Listen At Multiple Ports?

Dec 23, 2010

I am using a C application which connects to various other C applications at different ports through TCP,sends requests to all of them and then waits for the responses. The problem is that when the requests are fewer it gives a good response but with the increase in load the port at which the master application is listening get hogs and is unable to receive the responses.Can you please suggest the best way to tackle this issue? Is it possible for the master application to listen at multiple ports so that the load gets distributed and how?

View 7 Replies View Related

Programming :: X Error Of Failed Request - BadMatch?

Mar 15, 2010

I'm working on a old piece of code on linux, after compiling without porblem at the execution I have this response:

src/xproject/xproject: Ok, a color display! :-)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 78 (X_CreateColormap)
Serial number of failed request: 7
Current serial number in output stream: 15

looking at the source code I think the problem is related at the depth of my system 24 bit and the depth of this old piece of code 8 bit. Unfortunately also I don't have experience in programming the XVideo and if someone can give me some help in programming the XVideo interface

View 5 Replies View Related

Programming :: Grep And Pull The IP Based On The Request String?

May 5, 2010

in the access logs i have this:

Code:
IP.IP.IP.IP - - [01/May/2010:11:21:10 -0400] "BIG STRING" 414 250
how can i grep and pull the IP based on the request string?

View 7 Replies View Related

Programming :: Set Period Of Time To Tcp Connection To Wait For Request Or Respond For Tcp Block Read

Feb 27, 2010

I wanted to know how can I set a period of time to a tcp connection to wait for request or respond for tcp block read. which system call or function I can use? Does any body know a very simple quick and easy reference on web for socket programing that has lots of socket programing examples in it?

View 1 Replies View Related

Programming :: Http Authentication With Libxml2

May 29, 2011

I'm trying to add HTTP authentication to my app (it's a rss reader). As the app is in written in C and uses Libxml2, I've been searching in Libxml2 doc, but it seems it's not possible. Maybe someone could point me to a link to relevant info about how I could achieve that?

View 6 Replies View Related

Programming :: Php And (pdf) File Sending By Http?

Dec 9, 2010

I have a web page that has links to a php script that sends pdf files to the browser when clicked.
The links are like this:

Code:
<a href="getfile.php?id=1201234">

The files sent are shown embedded in the browser, which is what I want.

The problem is: the title of the browser window or tab in which the pdf file is opened is "getfile.php?id=1201234"), and not the actual file name of the pdf file.

Is it possible to send the file by a php script in a way that the window/tab title becomes the filename and not the link by which it has been accessed?

View 5 Replies View Related

OpenSUSE Network :: Listen To Music In Grooveshark Grooveshark - Listen To Free Music Online?

Feb 21, 2010

I'm using OpenSuse 11.2 64 bits When I try to listen to music in Grooveshark Grooveshark - Listen to Free Music Online - Internet Radio - Free MP3 Streaming I can listen fine, and it seems to work ok, when suddenly the sound of the website stops to work, my processor gets overload and I've to reopen the site to continue to listen. I get the following message in kernel (I'm no sure if it's related)

[ 3402.591674] ide-cd driver 5.00
[ 3402.622010] ide-gd driver 1.18
[ 3402.691580] st: Version 20081215, fixed bufsize 32768, s/g segs 256
[ 3404.308048] end_request: I/O error, dev fd0, sector 0
Some Hardware Info:

[Code]...

View 2 Replies View Related

Programming :: Java - Many Redirects On HTTP Connection?

Feb 1, 2011

I'm trying to open a web page to automate some data checking, and I'm getting a "too many redirects" exception. I'm not experienced enough with Java to know what to try next, and would like some help.

I'll show the code for what I've tried, but first, details about the website:[URL].. The website is a series of aspx pages. Going to the above address in a browser gets you to "default.aspx"--a search page. You don't see the redirects (specifically to a Login.aspx page--which redirects back to default.aspx). I can get the search page with either Firefox or wget--and on the same computer that I'm writing the Java code on. So, Firefox and wget are doing something that my code isn't. Also, I'm not behind a proxy.

I've searched about the redirect exception, and one or two pages blame poor website development. That may be true, but I don't have any control over the website. So, fixing the website is not an option.

I did find this page where someone has the same issue. I used some code given in one of the responses to discover the default.aspx->Login.aspx->default.aspx redirection loop.

Much of my code was pulled from the Working with URLs and Working with Cookies tutorials from Oracle. I tried adding the cookie handler thinking that maybe Login.aspx was trying to create a session ID or some other connection-specific identifier. But either cookies are not the solution OR I just didn't code it the right way.

[Code]...

After more searching, I'm 99% certain it's a cookie-handling issue. I added some more code (not included in the above) that examines the full response from the redirect to the Login.aspx page. The response includes a Set-Cookie header for "ASP.NET_SessionId". Now to find some code that will store and send the session ID.

View 1 Replies View Related

Programming :: Replacing Text With A Http Link With Sed?

Dec 10, 2010

Been at this all morning and fail on every attempt.

I have a file called sitemapindex.xml

Its contents just are names of the other sitemaps. Google gets pissy because it isn't in a http:// format.

So, I need "<loc>sitemap-c1mediawiki-............</loc>" to be replaced with "<loc>http://domain.tld/sitemap-c1mediawiki-............</loc>".

Here's the expression I've been trying:

find /path/to/site/sitemap-index-c1mediawiki* -type f | xargs sed -i 's/[<loc>sitemap]/[<loc>http://domain.tld/]/'

It fails.

I've tried with and without brackets.

View 4 Replies View Related

Programming :: Execute C Program Through HTML On HTTP Web Server?

Oct 15, 2009

I would like to execute an already written C program that I am running on my embedded Linux, but from afar - through a HTML page. I am running an embedded Linux on my FPGA prototype board with a MicroBlaze soft processor. On this Linux i am running a httpd web server - I can serve html web pages to the outside through Ethernet connection. Now, I have a program written in C in this embedded Linux in /bin/gpio-test that does some stuff with my IO devices. Now I would like to control these IO devices through HTML web page - so I would like to be able to run this gpio-test program from a html web page and possibly send the program some parameters.

View 2 Replies View Related

Programming :: G++ Error \ Http://gcc.gnu.org/onlinedocs/gcc/i3...4-Options.html?

Apr 1, 2011

Code:
Andrew@Mac:~$ g++ -march=athlon64-sse3 -O2 Projects/omgarrays.cpp -o Desktop/omg
Projects/omgarrays.cpp:1: error: bad value (athlon64-sse3) for -march= switch

[code]....

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved