This reverts commit e6f0cd336d. These modifications are too specific to use cases and shouldn't be part of nginx module.
e6f0cd336d