The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Hello, I am testing SQL Anywhere 12 12.0.1.3605 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://user:pass@www.domain.com/test/test.php' type 'HTTP:POST'

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


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
44357
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 :)

See...

http://dcx.sybase.com/sa160/en/dbprogramming/httpserver-s-2996732.html

Section 14.13 Content-Length in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

(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 12.0.1.4104 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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×404

question asked: 30 Jul '13, 02:40

question was seen: 1,916 times

last updated: 26 Oct '14, 10:08