These are things I would do to debug this situation:

 * does this work ok on your local system?
 * On the deployed server, check to see if you are able to send the
   special chars data via the GET, and POST requests. Is the server not
   having access to this data in for both these verbs?
 * On the web2py, controller code, see if the request.post_vars, or
   request.body.read() contains the values sent in, and if they retain
   their encoding.
 * If this request is not reaching your web2py code 'correctly', you
   could even log the incoming request's body in the nginx log... and
   verify if you are receiving data correctly. To enable logging of
   request body, do this in your nginx log:
   insert /etc/nginx/sites_enabled/web2py -> under http / 80{} with the
   following code segment
   log_format postdata
   
'"$time_local","$remote_addr"'',"$request","$request_body","$status","$bytes_sent"'',"$http_referer","$http_user_agent"';access_log
   /path-to-access.log postdata;


________________________________________
Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Fri, 23-10-2015 7:58 AM, Gustavo Moreira Freitas wrote:
Hello guys,

I have a little trouble with my ubuntu 14.04 32 bits/web2py/uwsgi/nginx.I install web2py using setup-web2py-nginx-uwsgi-ubuntu.sh from last version.

When i send my json without special characteres(like é ç ê), my restful work very nice. However when i sent any special char, does show nothing on **vars. As following iamges:

without special chars - works:

<https://lh3.googleusercontent.com/-kymH8siVV6k/VimWNm8NsVI/AAAAAAAACWA/dzd4NdD5HKE/s1600/2015-10-23%2B00_05_56-SoapUI%2B5.2.1.png>


with special chars - not working:

<https://lh3.googleusercontent.com/-s74bcFpz_w8/VimX2-KF1qI/AAAAAAAACWM/sw61SX4RtLU/s1600/2015_10_23_00_11_54_SoapUI_5.2.1.png>



When i put some debugs on source, bring me empty

<https://lh3.googleusercontent.com/-gFE8XoLNhl8/VimYNAbR3wI/AAAAAAAACWU/efwJXmf9lCk/s1600/2015-10-23%2B00_14_44-Editing%2BAddUpdateAddress.png>



this is my nginx.conf:

user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {
    override_charset on;
    uwsgi_read_timeout    60000;
    proxy_connect_timeout    60000;
    proxy_send_timeout    60000;
    proxy_read_timeout    60000;
    send_timeout    60000;
    client_max_body_size 50M;
    ##
    # Basic Settings
    ##
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;
        #gzip_disable "msie6";

        #gzip_vary on;
        #gzip_proxied any;
        #gzip_comp_level 6;
        #gzip_buffers 16 8k;
        #gzip_http_version 1.1;
#gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # nginx-naxsi config
        ##
        # Uncomment it if you installed nginx-naxsi
        ##

        #include /etc/nginx/naxsi_core.rules;

        ##
        # nginx-passenger config
        ##
        # Uncomment it if you installed nginx-passenger
        ##

        #passenger_root /usr;
        #passenger_ruby /usr/bin/ruby;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}


#mail {
#       # See sample authentication script at:
#       # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#       # auth_http localhost/auth.php;
#       # pop3_capabilities "TOP" "USER";
#       # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#       server {
#               listen     localhost:110;
#               protocol   pop3;
#               proxy      on;
#       }
#
#       server {
#               listen     localhost:143;
#               protocol   imap;
#               proxy      on;
#       }
#}




log UWSGI:

without special chars
[pid: 1198|app: 0|req: 95/187] 187.94.180.188 () {42 vars in 608 bytes} [Fri Oct 23 00:05:01 2015] POST /api/AddUpdateAddress.json => generated 511 bytes in 470 msecs (HTTP/1.1 200) 6 headers in 335 bytes (2 switches on core 0)

with special chars
[pid: 1198|app: 0|req: 101/198] 187.94.180.188 () {42 vars in 608 bytes} [Fri Oct 23 00:10:04 2015] POST /api/AddUpdateAddress.json => generated 30 bytes in 489 msecs (HTTP/1.1 200) 6 headers in 335 bytes (2 switches on core 0)

on log NGINX:
on access.log

187.94.180.188 - - [23/Oct/2015:00:25:47 -0200] "POST /api/AddUpdateAddress.json HTTP/1.1" 200 22 "-" "Apache-HttpClient/4.1.1 (java 1.5)" 187.94.180.188 - - [23/Oct/2015:00:25:55 -0200] "POST /api/AddUpdateAddress.json HTTP/1.1" 200 509 "-" "Apache-HttpClient/4.1.1 (java 1.5)"

and no bring errors on error.log

Someone can help me? I dont know how to fix it. I have already reinstall my vps on digital ocean and still have same issue. i have do a lot of modifications on nginx as too... i am stuck on debugging...


Grateful for attention.
Gustavo M Freitas
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com <mailto:web2py+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to