lambdacasserole / avogadrio

Worship your favorite molecule by setting it as your wallpaper.
https://avogadr.io/
MIT License
297 stars 11 forks source link

Sub-requests for large molecules causing issue #19

Closed lambdacasserole closed 7 years ago

lambdacasserole commented 7 years ago

If we search chlorophyll for example we get a very long SMILES string:

[Mg++].CCc1c(C)c2[n-]c1cc3nc4c([C@@H](C(=O)OC)C(=O)c4c3C)c5nc(cc6[n-]c(c2)c(C=C)c6C)[C@@H](C)[C@@H]5CCC(=O)OC/C=C(C)/CCCC(C)CCCC(C)CCCC(C)C

Which becomes outright monstrous when URL-encoded:

%5BMg%2B%2B%5D.CCc1c%28C%29c2%5Bn-%5Dc1cc3nc4c%28%5BC%40%40H%5D%28C%28%3DO%29OC%29C%28%3DO%29c4c3C%29c5nc%28cc6%5Bn-%5Dc%28c2%29c%28C%3DC%29c6C%29%5BC%40%40H%5D%28C%29%5BC%40%40H%5D5CCC%28%3DO%29OC%2FC%3DC%28C%29%2FCCCC%28C%29CCCC%28C%29CCCC%28C%29C

This breaks sub-requests in Silex as far as I can tell. The only real solution is to avoid passing these strings from action to action and deal with them in the same action they're generated in. This is going to create some redundant code for the time being.

lambdacasserole commented 7 years ago

Fixed by #20.