<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MQX 4.1 HTTPSRV_cgi_write unhandled exception in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408248#M13678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;&amp;nbsp; HTTPSRVCFG_SES_BUFFER_SIZE is size of session buffer. Session buffer is used for buffering user data (CGI, SSI, files from file system etc.) for both sending and receiving.&lt;BR /&gt;&amp;nbsp; HTTPSRVCFG_TX_BUFFER_SIZE value is set with setsockopt function as OPT_TBSIZE for each session socket.&lt;BR /&gt; &lt;BR /&gt; Generally speaking, HTTPSRVCFG_SES_BUFFER_SIZE should be less than HTTPSRVCFG_TX_BUFFER_SIZE&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2015 13:58:32 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2015-06-08T13:58:32Z</dc:date>
    <item>
      <title>MQX 4.1 HTTPSRV_cgi_write unhandled exception</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408245#M13675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have recently run into an issue when I call HTTPSRV_cgi_write. An unhandled exception occurs seemingly at _task_block.&lt;/P&gt;&lt;P&gt;Call Stack:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="callstack.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31856i9BC694663CA666D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="callstack.JPG" alt="callstack.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I basically followed what I found in the web_hvac example and my function that calls &lt;SPAN style="font-family: 'courier new', courier;"&gt;HTTPSRV_cgi_write&lt;/SPAN&gt; (&lt;SPAN style="font-family: 'courier new', courier;"&gt;s32_CGI_Post_Nav&lt;/SPAN&gt;) never gets to its return statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code snippet from &lt;SPAN style="font-family: 'courier new', courier;"&gt;s32_CGI_Post_Nav&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;HTTPSRV_CGI_RES_STRUCT st_Response;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st_Response.ses_handle = pst_Param-&amp;gt;ses_handle;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st_Response.content_type = HTTPSRV_CONTENT_TYPE_HTML;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st_Response.status_code = 200;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st_Response.data = "&amp;lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Navigation NONE Response&amp;lt;/title&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"&amp;lt;meta http-equiv=\"REFRESH\" content=\"0;url=index.html\"&amp;gt;&amp;lt;/head&amp;gt;\n&amp;lt;body&amp;gt;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;\n&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st_Response.data_length = strlen( st_Response.data );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;st_Response.content_length = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;HTTPSRV_cgi_write( &amp;amp;st_Response );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;return ( st_Response.content_length );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am ultimately trying to reload a certain page after a form post but nothing is ever getting sent back to the browser.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do a &lt;SPAN style="font-family: 'courier new', courier;"&gt;HTTPSRV_cgi_read&lt;/SPAN&gt; before setting the response and i have verified all data has been read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the K64 Freedom Board. CPU: MK64FN1M0VLL12&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 17:58:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408245#M13675</guid>
      <dc:creator>justinancheta</dc:creator>
      <dc:date>2015-05-28T17:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.1 HTTPSRV_cgi_write unhandled exception</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408246#M13676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the unhandled exception maybe related to memory issue, I suggest you check the st_Response.data buff, there is a reference code under the folder rtcs\examples\httpsrv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2015 08:27:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408246#M13676</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2015-06-03T08:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.1 HTTPSRV_cgi_write unhandled exception</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408247#M13677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think i was going off the hvac example because the httpsrv has only GET examples and no POST ones. I also ran into the same kind of error with the HTTPSRV_ssi_write command. I was finally able to figure out that HTTPSRVCFG_TX_BUFFER_SIZE and&lt;SPAN style="line-height: 1.5;"&gt; HTTPSRVCFG_SES_BUFFER_SIZE were too small for what i was trying. I also get an error if HTTPSRVCFG_SES_BUFFER_SIZE is larger than HTTPSRVCFG_TX_BUFFER_SIZE&amp;nbsp; (if HTTPSRVCFG_SES_BUFFER_SIZE&amp;nbsp; is more full than HTTPSRVCFG_TX_BUFFER_SIZE&amp;nbsp; is big). Am I correct in my findings?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;I am just now coming back to the cgi stuff because I had other things to do so Ill be trying them again with the increased buffer sizes.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 23:59:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408247#M13677</guid>
      <dc:creator>justinancheta</dc:creator>
      <dc:date>2015-06-04T23:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: MQX 4.1 HTTPSRV_cgi_write unhandled exception</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408248#M13678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;&amp;nbsp; HTTPSRVCFG_SES_BUFFER_SIZE is size of session buffer. Session buffer is used for buffering user data (CGI, SSI, files from file system etc.) for both sending and receiving.&lt;BR /&gt;&amp;nbsp; HTTPSRVCFG_TX_BUFFER_SIZE value is set with setsockopt function as OPT_TBSIZE for each session socket.&lt;BR /&gt; &lt;BR /&gt; Generally speaking, HTTPSRVCFG_SES_BUFFER_SIZE should be less than HTTPSRVCFG_TX_BUFFER_SIZE&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 13:58:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-4-1-HTTPSRV-cgi-write-unhandled-exception/m-p/408248#M13678</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2015-06-08T13:58:32Z</dc:date>
    </item>
  </channel>
</rss>

