AnsweredAssumed Answered

How to Use httpd_sendfile

Question asked by Matias Ferrari on Jan 14, 2011
Latest reply on Apr 27, 2011 by Marcos Di Fazio

Hi,

 

Can someone help me with this problem? I want to send a text file (file.txt) using httpd_sendfile. 

 

I Supouse that I need some like cgi callback funtion or somethig similar, but I'm no sure abuot it neither how to use this funtion. 

 

In http_supp.h is the prototype of httpd_sendfile that has as parameters:

HTTP_STRUCT *server

HTTP_SESSION_STRUCT *session

 

Where does file.txt appear? Does the server response to http_request.open('GET', 'http://webs/file.txt', true); is a file in a  callback funtion? How to do I handle this request?

 

I hope that my questions were understood and exposed in a clearly way 

Thank you in advance

Outcomes