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) endHow can I post a text greater than 8192 bytes in one session ? Regards, Veselin |
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
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.
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.