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