我有一个产品搜索,我发布到添加到篮子的网络服务。
问题是,我可视化所有产品变化(比如颜色和大小)。我刚刚遇到了数据库中的一个项目,它有10种大小和30种颜色可供选择,结果是network error, uri too large
,因为我的AJAX发布了这个:
"NetworkError: 414 Request-URI Too Large - http://www.page.de/test/services/form_cfc?form_submitted=add&s_artikelnummer=TSHIRT+2011+nos+ja&ean1=2011301051003&menge1=&ean2=2011301051004&menge2=&ean3=2011301051005&menge3=&ean4=2011301051006&menge4=&ean5=2011301051007&menge5=&ean6=2011301051008&menge6=&ean7=2011301051009&menge7=&ean8=2011301051010&menge8=&ean9=2011301051011&menge9=&ean10=2011301050903&menge10=&ean11=2011301050904&menge11=&ean12=2011301050905&menge12=&ean13=2011301050906&menge13=&ean14=2011301050907&menge14=&ean15=2011301050908&menge15=&ean16=2011301050909&menge16=&ean17=2011301050910&menge17=&ean18=2011301050911&menge18=&ean19=2011301050803&menge19=&ean20=2011301050804&menge20=&ean21=2011301050805&menge21=&ean22=2011301050806&menge22=&ean23=2011301050807&menge23=&ean24=2011301050808&menge24=&ean25=2011301050809&menge25=&ean26=2011301050810&menge26=&ean27=2011301050811&menge27=&ean28=2011301052103&menge28=&ean29=2011301052104&menge29=&ean30=2011301052105&menge30=&ean31=2011301052106&menge31=&ean32=2011301052107&menge32=&ean33=2011301052108&menge33=&ean34=2011301052109&menge34=&ean35=2011301052110&menge35=&ean36=2011301052111&menge36=&ean37=2011301052003&menge37=&ean38=2011301052004&menge38=&ean39=2011301052005&menge39=&ean40=2011301052006&menge40=&ean41=2011301052007&menge41=&ean42=2011301052008&menge42=&ean43=2011301052009&menge43=&ean44=2011301052010&menge44=&ean45=2011301052011&menge45=&ean46=2011301052203&menge46=&ean47=2011301052204&menge47=&ean48=2011301052205&menge48=&ean49=2011301052206&menge49=&ean50=2011301052207&menge50=&ean51=2011301052208&menge51=&ean52=2011301052209&menge52=&ean53=2011301052210&menge53=&ean54=2011301052211&menge54=&ean55=2011301052303&menge55=&ean56=2011301052304&menge56=&ean57=2011301052305&menge57=&ean58=2011301052306&menge58=&ean59=2011301052307&menge59=&ean60=2011301052308&menge60=&ean61=2011301052309&menge61=&ean62=2011301052310&menge62=&ean63=2011301052311&menge63=&ean64=2011301052903&menge64=&ean65=2011301052904&menge65=&ean66=2011301052905&menge66=&ean67=2011301052906&menge67=&ean68=2011301052907&menge68=&ean69=2011301052908&menge69=&ean70=2011301052909&menge70=&ean71=2011301052910&menge71=&ean72=2011301052911&menge72=&ean73=2011301052703&menge73=&ean74=2011301052704&menge74=&ean75=2011301052705&menge75=&ean76=2011301052706&menge76=&ean77=2011301052707&menge77=&ean78=2011301052708&menge78=&ean79=2011301052709&menge79=&ean80=2011301052710&menge80=&ean81=2011301052711&menge81=&ean82=2011301052603&menge82=&ean83=2011301052604&menge83=&ean84=2011301052605&menge84=&ean85=2011301052606&menge85=&ean86=2011301052607&menge86=&ean87=2011301052608&menge87=&ean88=2011301052609&menge88=&ean89=2011301052610&menge89=&ean90=2011301052611&menge90=&ean91=2011301052803&menge91=&ean92=2011301052804&menge92=&ean93=2011301052805&menge93=&ean94=2011301052806&menge94=&ean95=2011301052807&menge95=&ean96=2011301052808&menge96=&ean97=2011301052809&menge97=&ean98=2011301052810&menge98=&ean99=2011301052811&menge99=&ean100=2011301053003&menge100=&ean101=2011301053004&menge101=&ean102=2011301053005&menge102=&ean103=2011301053006&menge103=&ean104=2011301053007&menge104=&ean105=2011301053008&menge105=&ean106=2011301053009&menge106=&ean107=2011301053010&menge107=&ean108=2011301053011&menge108=&ean109=2011301051903&menge109=&ean110=2011301051904&menge110=&ean111=2011301051905&menge111=&ean112=2011301051906&menge112=&ean113=2011301051907&menge113=&ean114=2011301051908&menge114=&ean115=2011301051909&menge115=&ean116=2011301051910&menge116=&ean117=2011301051911&menge117=&ean118=2011301051803&menge118=&ean119=2011301051804&menge119=&ean120=2011301051805&menge120=&ean121=2011301051806&menge121=&ean122=2011301051807&menge122=&ean123=2011301051808&menge123=&ean124=2011301051809&menge124=&ean125=2011301051810&menge125=&ean126=2011301051811&menge126=&ean127=2011301051403&menge127=&ean128=2011301051404&menge128=&ean129=2011301051405&menge129=&ean130=2011301051406&menge130=&ean131=2011301051407&menge131=&ean132=2011301051408&menge132=&ean133=2011301051409&menge133=&ean134=2011301051410&menge134=&ean135=2011301051411&menge135=&ean136=2011301051703&menge136=&ean137=2011301051704&menge137=&ean138=2011301051705&menge138=&ean139=2011301051706&menge139=&ean140=2011301051707&menge140=&ean141=2011301051708&menge141=&ean142=2011301051709&menge142=&ean143=2011301051710&menge143=&ean144=2011301051711&menge144=&ean145=2011301051503&menge145=&ean146=2011301051504&menge146=&ean147=2011301051505&menge147=&ean148=2011301051506&menge148=&ean149=2011301051507&menge149=&ean150=2011301051508&menge150=&ean151=2011301051509&menge151=&ean152=2011301051510&menge152=&ean153=2011301051511&menge153=&ean154=2011301051603&menge154=&ean155=2011301051604&menge155=&ean156=2011301051605&menge156=&ean157=2011301051606&menge157=&ean158=2011301051607&menge158=&ean159=2011301051608&menge159=&ean160=2011301051609&menge160=&ean161=2011301051610&menge161=&ean162=2011301051611&menge162=&ean163=2011301050203&menge163=&ean164=2011301050204&menge164=&ean165=2011301050205&menge165=&ean166=2011301050206&menge166=&ean167=2011301050207&menge167=&ean168=2011301050208&menge168=&ean169=2011301050209&menge169=&ean170=2011301050210&menge170=&ean171=2011301050211&menge171=&ean172=2011301050103&menge172=&ean173=2011301050104&menge173=&ean174=2011301050105&menge174=&ean175=2011301050106&menge175=&ean176=2011301050107&menge176=&ean177=2011301050108&menge177=&ean178=2011301050109&menge178=&ean179=2011301050110&menge179=&ean180=2011301050111&menge180=&ean181=2011301050603&menge181=&ean182=2011301050604&menge182=&ean183=2011301050605&menge183=&ean184=2011301050606&menge184=&ean185=2011301050607&menge185=&ean186=2011301050608&menge186=&ean187=2011301050609&menge187=&ean188=2011301050610&menge188=&ean189=2011301050611&menge189=&ean190=2011301050703&menge190=&ean191=2011301050704&menge191=&ean192=2011301050705&menge192=&ean193=2011301050706&menge193=&ean194=2011301050707&menge194=&ean195=2011301050708&menge195=&ean196=2011301050709&menge196=&ean197=2011301050710&menge197=&ean198=2011301050711&menge198=&ean199=2011301050303&menge199=&ean200=2011301050304&menge200=&ean201=2011301050305&menge201=&ean202=2011301050306&menge202=&ean203=2011301050307&menge203=&ean204=2011301050308&menge204=&ean205=2011301050309&menge205=&ean206=2011301050310&menge206=&ean207=2011301050311&menge207=&ean208=2011301050503&menge208=&ean209=2011301050504&menge209=&ean210=2011301050505&menge210=&ean211=2011301050506&menge211=&ean212=2011301050507&menge212=&ean213=2011301050508&menge213=&ean214=2011301050509&menge214=&ean215=2011301050510&menge215=&ean216=2011301050511&menge216=&ean217=2011301050403&menge217=&ean218=2011301050404&menge218=&ean219=2011301050405&menge219=&ean220=2011301050406&menge220=&ean221=2011301050407&menge221=&ean222=2011301050408&menge222=&ean223=2011301050409&menge223=&ean224=2011301050410&menge224=&ean225=2011301050411&menge225=&ean226=2011301052403&menge226=&ean227=2011301052404&menge227=&ean228=2011301052405&menge228=&ean229=2011301052406&menge229=&ean230=2011301052407&menge230=&ean231=2011301052408&menge231=&ean232=2011301052409&menge232=&ean233=2011301052410&menge233=&ean234=2011301052411&menge234=&ean235=2011301052503&menge235=&ean236=2011301052504&menge236=1&ean237=2011301052505&menge237=1&ean238=2011301052506&menge238=1&ean239=2011301052507&menge239=&ean240=2011301052508&menge240=&ean241=2011301052509&menge241=&ean242=2011301052510&menge242=&ean243=2011301052511&menge243=&ean244=2011301051203&menge244=&ean245=2011301051204&menge245=1&ean246=2011301051205&menge246=1&ean247=2011301051206&menge247=1&ean248=2011301051207&menge248=&ean249=2011301051208&menge249=&ean250=2011301051209&menge250=&ean251=2011301051210&menge251=&ean252=2011301051211&menge252=&ean253=2011301051103&menge253=&ean254=2011301051104&menge254=&ean255=2011301051105&menge255=&ean256=2011301051106&menge256=1&ean257=2011301051107&menge257=&ean258=2011301051108&menge258=&ean259=2011301051109&menge259=&ean260=2011301051110&menge260=&ean261=2011301051111&menge261=&ean262=2011301051303&menge262=&ean263=2011301051304&menge263=&ean264=2011301051305&menge264=1&ean265=2011301051306&menge265=1&ean266=2011301051307&menge266=&ean267=2011301051308&menge267=&ean268=2011301051309&menge268=&ean269=2011301051310&menge269=&ean270=2011301051311&menge270=&artikel_anzahl=270&radio_add=1&method=process&returnformat=JSON"
问题:
该怎么办?我无法更改基础程序,因此限制用户可以创建的变体数量的唯一方法是什么?这是一个边缘案例,但不过。
感谢您的投入!
答案 0 :(得分:4)
发布数据而不是将其传递到网址中。这可能是一个小调整,但你可以发布更多的数据。最大uri长度取决于客户端和服务器。对于IIS,默认值为2Kb(约2000个字符),但可以将其修改为更大。我认为IE使用相同的限制,虽然我不确定更新的版本。
无论如何,最大2Kb是您应该尊重的限制,尽管它不是官方限制。如果数据较大,请将其发布。
答案 1 :(得分:1)
答案 2 :(得分:1)
TL; DR:使用POST代替GET。