Calling Google Apps Script as webapp from AppEngine returns 405 -


i have issues when try call gapps script published webapp. trying call service appengine. doing post method script json payload. urlfetch options set follow redirects , timeout of 30 secs. script publicly available , open anonymous users.

on local gae development machine, urlfetch response script 200, , fine.

when move production, script gets executed returns errors , html page. have follow redirects on on urlfetch , have set deadline 30secs.

status response : 405

response text : <!doctype html><html lang="en" ><head><meta name="description" content="web word processing, presentations , spreadsheets"><link rel="shortcut icon" href="//ssl.gstatic.com/docs/common/drive_favicon1.ico"><title>google drive -- page not found</title><link href="//fonts.googleapis.com/css?family=open+sans:300" rel="stylesheet" type="text/css"><style>/* copyright 2014 google inc. rights reserved. */ .goog-inline-block{position:relative;display:-moz-inline-box;display:inline-block}* html .goog-inline-block{display:inline}*:first-child+html .goog-inline-block{display:inline}#drive-logo{color:#91959c;font-family:"open sans",arial,sans-serif;font-size:27px;font-weight:300;position:absolute;text-shadow:0 1px 1px white;white-space:nowrap}#drive-logo img{padding:0 0.4em 0 0;position:relative;top:2px;vertical-align:middle}#drive-logo a{color:#91959c;text-decoration:none}#drive-logo span.goog-inline-block{margin-top:2px;vertical-align:top}</style><style type="text/css">body {background-color: #fff; font-family: arial,sans-serif; font-size: 13px; margin: 0; padding: 0;}a, a:link, a:visited {color: #112abb;}</style><style type="text/css">.errormessage {font-size: 12pt; font-weight: bold; line-height: 150%;}</style></head><body><div style="margin: auto; max-width: 750px;"><div style="margin: 80px 40px 20px 40px; position:relative; "><div style="position: absolute; top: -80px;"><h1 id="drive-logo"><a href="/"><img src="//www.google.com/images/logos/google_logo_41.png" width="116" height="41" alt="google logo" ><span class="goog-inline-block">drive</span></a></h1></div><div align="center"><p class="errormessage" style="padding-top: 50px">sorry, file have requested not exist.</p><p> please check address , try again. </p><div style="background: #f0f6ff; border: 1px solid black; margin-top: 35px; padding: 10px 125px; width: 300px;"><p><strong>get stuff done google drive</strong></p><p>apps in google drive make easy create, store , share online documents, spreadsheets, presentations , more.</p><p>learn more @ <a href="https://drive.google.com/start/apps">drive.google.com/start/apps</a>.</p></div></div></div></div></body></html>

  • response header:expires=fri, 01 jan 1990 00:00:00 gmt
  • response header:x-xss-protection=1; mode=block
  • response header:alternate-protocol=443:quic,p=0.02
  • response header:set-cookie=nid=67=ksieonzrwkqwvet8e4m2ruo_2nooej6qrh80lxtppgkyqux2igfn-bhoqn7r5yn0f4wayttbxda6y2iaa3ftrbman6qf526lmpkzzek7nsquvcv4wvthsdsl4p11yx;domain=.googleusercontent.com;path=/;expires=tue, 02-jun-2015 23:39:38 gmt;httponly
  • response header:x-google-cache-control=remote-fetch
  • response header:server=gse
  • response header:cache-control=no-cache, no-store, max-age=0, must-revalidate
  • response header:pragma=no-cache
  • response header:x-content-type-options=nosniff
  • response header:x-frame-options=sameorigin
  • response header:date=mon, 01 dec 2014 23:39:38 gmt
  • response header:p3p=cp="this not p3p policy! see http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 more info."
  • response header:allow=head, get
  • response header:x-chromium-appcache-fallback-override=disallow-fallback
  • response header:via=http/1.1 gwa
  • response header:content-type=text/html; charset=utf-8

the funny - no - thing the script works nevertheless of time not or not users.

you can see thet response header says allow=head, get implemented dopost in script.

nevertheless, have tried solving problem rewriting whole things work get , parameter running similar issues !

long story short : works , status response 200 on gae local development server, faulty responses , unstable behavior when deployed gae>

gas picky when running webapp. helps put script public folder on google drive.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -