Announcement

Collapse
No announcement yet.

Wont display web pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wont display web pages

    Hello All,

    The code I am writing is not cooperating, and won't display the webpages I made.
    I verified that error pages will display (using the httpSendError() API function), and that the code at least things it displayed the web page correctly, using the HttpWriteDataWithOkHeaderAndNoContentLength() function, but no matter which browser I use I can't actually see anything.

    And it does load the lantronix default configuration web pages fine. So i'm at a little bit of a loss. Any ideas? (Code sample below)

    Code:
    //web page text
    static char * pCmHttpTest =
    	   "<html>\n"
    	   "<head>\n"
    	   "<title>CM 3.3.0 - Test Text</title>\n"
    	   "</head>\n"
    	   "<body>\n"
    	   "<p>The CM has succesfuly written an HTML web page</p>\n"
    	   "</body>\n"
    	   "</html>\n"
    	   ;
    
    //callback registration
    if (!HttpDynamicCallbackAdd(httpServer, "/test1", 	cm3TEST)) {
       TLOG(TLOG_SEVERITY_ERR, "Failed to register /test1 callback with HTTP Server."); 
    }
    
    //callback function 
    bool cm3TEST(struct http_client * httpClient) {
       if(!HttpWriteDataWithOkHeaderAndNoContentLength(httpClient, "text/html", pCmHttpTest)){
           cm3ERROR(httpClient);
       }
    
       return TRUE;
    }
    Oddly Enough,
    --
    Ilya C

  • #2
    Sorry, I forgot to mention that I am using SDK Release v5.2.0.0 R21
    Oddly Enough,
    --
    Ilya C

    Comment

    Working...
    X