Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9313027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:46:45+00:00 2026-06-19T01:46:45+00:00

Has anyone got this issue with MAX_ENTITY_SIZE? I am fighting with this for quite

  • 0

Has anyone got this issue with MAX_ENTITY_SIZE? I am fighting with this for quite awhile now. I hope I am just doing something stupid or somebody found a solution for this.

I am using G-WAN 4.2.7 on Ubuntu 64bit latest version.

Here is a test case. Just paste any text on textarea then click submit. If its lesser than 4KB (Or less than 3.2KB) it will work fine. If its greater than 4KB it will return with a 404 not found but it should work since I set the MAX_ENTITY_SIZE to 200KB.

#include "gwan.h" // G-WAN exported functions
#include <string.h>

int main(int argc, char *argv[])
{
    xbuf_t *reply = get_reply(argv);    
    int *entity = (int*)get_env(argv, MAX_ENTITY_SIZE);

    char *text = NULL;
    get_arg("stext=", &text, argc, argv);
    if(text) // Check if text exist.
        xbuf_xcat(reply, "Text: %s<br/><br/>%d", text, strlen(text));

    static char form[] = 
        "<form method=\"post\">"
            "<textarea name=\"stext\"></textarea><br/>"
            "<input name=\"button\" type=\"submit\" value=\"Submit\" />"
        "</form><br/>Entity Size: %d";
    xbuf_xcat(reply, form, *entity);

    return 200;
}

Dont forget to increase the MAX_ENTITY_SIZE limit:

int init(int argc, char *argv[])
{
   int *entity = (int*)get_env(argv, MAX_ENTITY_SIZE);
   *entity = 200 * 1024;
   return 0;
}

UPDATE:

Tested on Ubuntu 10.10 with same issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:46:46+00:00Added an answer on June 19, 2026 at 1:46 am

    G-WAN v4.2.19 has been shipped with enhanced entity.c and entity_size.c examples which have been tested with a 1.7 MiB file upload. Just give it a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone got this working in a web application? No matter what I do
Has anyone got this configuration working? Latest Netbeans, latest Glassfish, I created an EJB
Has anyone got practical experience or a reference for a scheme that implements a
Has anyone got any experience/thoughts on the CSLA.netContrib project on codeplex - here .
Has anyone got a script for git that can go through the history, check
Has anyone got any idea why the menu is rendering below the rotating images
Has anyone got an emacs regexp handy to do the following generic replacement? (*ptr_to_struct).member_var
I've got this issue: I've got a dataGrid where whenever I set the column
Can anyone help me with this problem I have. Quite hard to summarise into
Hope this question hasn't been asked before. I've got the following working <!-- 640x920

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.