如何计算补丁请求的数据限制(在Rails中)?

时间:2014-07-30 17:17:20

标签: ruby-on-rails http httprequest

我使用补丁请求通过rails 4 API更新风筝资源。每只风筝都有名字和描述。为了论证,让我们说一个描述可以和学期论文的长度一样长。我注意到,当我通过补丁更新风筝时,一切都很好。如果时间更长,则更新似乎不会发生,并且日志中没有证据表明补丁请求路由到的更新方法被调用。这是补丁工作时的日志输出(已清理):

[30/Jul/2014 09:40:58] "PATCH /1/kites/5?name=JaneKite&description=20%02l0_rt2%22iyp0s%2d%2%%i2%bA2%D2%20t%22%%2%%02mc%i02a0e2Aae2%0AE%0va%a2i20o00a%0c%i2A2s00nlsi2%%%2%iCenr0A200%222A%h2te%0c20l2222%%CA2m2aCgtohr2g02%C22sy2o0%0AC%s2A%0nrna%uc0t22%tcss%00sa%2a0%e0%2%%%C20a%0020l0022%rAuC002eu%c0%%0r%_oeeclr%ys%D20on0%t0r%S0l%0%%2a%02oA2p2220%%2A2%a%0c00%rn0%e2022-0Ca2&r00eetilc0%2%90220n0%%2000002%%%%e2%02020rl2222220000022C220_V2oyi%0%0avf2r20I00%gat2o%e%i0%0D%e2l.22a20oS0vlC20022%2sAce20inc.232oD-e25o22a20l2%%0nef%%0-%n020t20222%0ro22%es%0%so2e20b1o22n%0en00%o2%%%s%0k%0s_%0A20%T%%hd0nA0e0224if0I2%a0A0n0os2l001tud%0%%tm0uf2I%2n2%NeGB%M2A2y200ct22l0u%o2a%2e202a%220B0002ntdsna22r_r0%%%22%tA2i2ecsBB%Do020p=2at0i2%0gs0020%%2%%%%p%a2200s%2AtrUr20C2up02%20lyD%i20a20g0o0n%2t0ia0a2y'00%22T%%02f%%lb_u2Il%nl0sa0M4C%0%a00%S%0220le0e%0r200A0H0t0t%22f0%%a0002e2022cT222i02a%t%d%%2ttAt20%A22e0%%02%_0vB0p0dode2020%i%i=%0RD0Fa0%eee20%as2mCt2c2i%n%tac0c2%ul%200%%%0%%%%0r%00iA0FM%2e%l%i0%2%0%02sa%%o2%c%a0222%i0a2ttt%2N0200or)i%evs0%%220%0n00d0t02c2o02g2i%_2n%0t2%0ei22%sr%e3Tee%sS%20%ttD%%v%e%2020a%2%oi%iD%2ioU2n0sCs%eerc0%a020%v%0n2o2e%2a2t%000A000o00m%ei%22t2%%e%0a0yo22s%02An0I20%&u0i2%0e0e%2ypu02%%2hx0a_0=ht%0n%2e%t.0002i2aia21%222t%%02t2ha00%2%0%w%250%%%%et&rD%y2he0D2%u%2e%RS%C0%n2oD22r00Annp%fua0220%0A%002o202%%02SD%o%0m%Di20%u0ac2%D00sLa2s222%%%22rn%e%%%d02%=%2200%(rr=%20ac%0o220r20_v2%y%do%noPlsA%Nro2t%000%02%0220%C%%0%0%%c%gC022222ls2D00sf0202t3c%He02%a00s%%0v%2%b02e%020a%l%2si%20%0r20rn0u%nt%te%%2U%o02elu0c%%i%%%00%02a%t%e%%2A222l%0020il%%000i00%02an22002re0%20a020C2%Nstcn%2i2g0tr0Tl_%%2s22a0ls2s-DgiaPen1e%0a2s0c0Dd%00re0%%S%00%00%ilo%_n%%2a0%i00o0u%000%20mre%0P00%%2%0m0tC2oeD2%%%a2D0s%2%usC%%02Ai%0220a20m2Ds2re%i0%l%a%iy0%2%P00%%t0s000%n%od%2&020lc&%%l%st%e%n%23%2%00ep0as00oat20l0%03%%%i%%2uio%Sr0%%r0%u%nt0o%a%%%2%022C%%%o20t%%0%o0A%%0iC%%00og%a02%%gtl00002%D22fl%%00im2%20&ue2c0rno%_20%%2%n%22aehe02a.daeDAtPec%a0t%ter2nsa%2rAn%0st%0l32etc%a2t0i%c2%0%2%%g0e2%0Al00r%%2y02D0e2u002%220ie00%0i2%2%2a22o2ts%a0ir%e20r22%Du0e21ita%Pnt%eM%nu0%5%0%l%0caf%%%2%22002i2nc02t20Tlncm%nsDA.0l1i0%22%ro2202_riDr2l0Ap0222%0e%2tme%20%%u2pn22%202vs0C2%020%00%0pDrar2o2%%0%f22%s&ro%tr22%0i0.2%ta0%22%%%20c%220nsfrrc0ital%02_0%c22%%o 22Au2o%2%0%%2C%&%niieram%2H0220.20A00%C%020us2%n0sa20nrtae%oo0S2%i%e0t0ea%rv00l0%0e2%r=22e00eB5e2%202lt2fh2%%2a2ld2N2%02%2%0002%gTa0%s2L22g2%2s2%B20i%aeSUese0r0t022a2%in0r02%20%tss02&2ati2%ss0on2%023i%9%iau000AD0200ns%20e0r0%f%iSc2=0%2c0m2D2c222s0%Af%202%s20202%3%000n%At%0a2trs%20Dd%%ad2iln00t2n2A0o%0%%L0aLmiA00A0c%Dgd22g2%%l0200U0r%%%i0yNe%n020ilu%%000e0i%y2o%l%50Uem%2002a%%0%00%di2.2e0t%o5%u%2oeSi02000H%%i2t%r%D%s%0i0%2redy22P0g%0&%22D22e202%0sn%e20222%ie0i%00Dn220sa2%2%&u%2tb2%a%2h%sC022b02rl0v%t%%s_202%020%%0=020%40%%0hsr2eo02%tv%20s%r2b00%a2220%%r%A0F2.co%2i2le=%tr20%I%2%%r%A%0cri%%a2%%c20%%%0&D9Aruv%kn0%0i2%0220ee%2teag2ts%o2u0t200oA%S%i0%%=00l0%%%=2f00n20tah0%tna%2e%yt%0Dny2c0rp%%%g%02%D020o%0c022%t0eo2i02%c009te0di22ca222ice00%20%c0A2A2tA0%nn2acErD0mtMDth0022%2%%222%0s0D2i2%0%0%y%e2202%2%20e0r022%s20on%%0lc2-00%2%sll0002=%ft%0%.us22%0b%f%=ilC00iDa%%0%%%i%02p%oyc2An20oh02d20tet%%0a022%2t2s%&20%%%0t%0%%02i22pea0ut2222%5%l%soroi%l20%a2P22ld%mGtnr%1ey0220cn20r0%20%i%N%%00%0tcm0%n%igo%%lis20
HTTP/1.1" 500 22197 13.7511

1)是数据大小限制还是URL大小限制,如果是,我该如何计算限制? 2)我可以通过POST请求绕过限制,据我所知,没有数据大小限制吗?

编辑:

我正在使用HTTParty gem

   response = HTTParty.post(url,{:body => payload})

0 个答案:

没有答案