The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Hello, I am testing SQL Anywhere 12 web client procedure but when the size of the parameters exceeds 8192 bytes appears the following error : SQLSTATE : WW052, Error Message : HTTP request failed, Status code '406 Not Acceptable'. The same test on 902 version works with size parameters over 1MB and I guess that depends on the value of the PHP configuration directive POST_MAX_SIZE which is usually set to 8 MB. The following are the procedures to test and if the file 'test.txt' exceeds 8192 bytes gives an error:

ALTER PROCEDURE "DBA"."test_http_post"( in filename char(256),in filedata long varchar ) 
url 'HTTP://' type 'HTTP:POST'

  declare t_file long varchar;
  set t_file = xp_read_file('test.txt');
  call dba.test_http_post('newfile.txt',t_file)

How can I post a text greater than 8192 bytes in one session ?

Regards, Veselin

asked 30 Jul '13, 02:40

Veselin%20Ivanov's gravatar image

Veselin Ivanov
accept rate: 0%

edited 31 Jul '13, 07:22

I'll take a guess: Perhaps you can use the CREATE PROCEDURE ... HEADER clause to set the Content-Length to the !content_length value of a new parameter called content_length. I suggest a simple hard-coded experiment to see if it works at all :)


Section 14.13 Content-Length in

(31 Jul '13, 09:48) Breck Carter

Hello Breck, I return again to the question of 8192 bytes limit. I am testing SQL Anywhere 12 web client procedure, but there is still a limitation of 8192 bytes lenght for all parameters of the procedure. Using HEADER clause to set the Content-Length I can reduse below 8192 bytes but not above. Perhaps this limitation is set in the database and I wonder whether it can be increased.

(26 Oct '14, 06:44) Veselin Ivanov
Replies hidden
Comment Text Removed

Try posting a new question.

If you have a copy of SQL Anywhere 16, it would be interesting to know if your test works there or not.

(26 Oct '14, 10:08) Breck Carter
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 30 Jul '13, 02:40

question was seen: 1,961 times

last updated: 26 Oct '14, 10:08